Do you recommend using "use strict" in JS? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 4

Do you recommend using "use strict" in JS?

Do you recommend that for code control, or you think that this is unnecessary restrictive?

26th Dec 2022, 4:42 PM
Dominik Vladař
Dominik Vladař - avatar
1 Antwort
+ 5
Strict mode is an important part of modern JavaScript. It is this mode that allows developers to use a more limited syntax than the standard one. Strict mode does the following: Throws errors when some unsafe constructs are used in the code. Turns off language features that obfuscate the code and therefore should not be used. Prevents the use of words that may be used as keywords in the future. I recommend using this to get cleaner and more readable code
26th Dec 2022, 5:33 PM
Knight
Knight - avatar