Question from the Javascript test

Which statements are true about JavaScript Strict Mode?

Hard

Which statements are true about JavaScript Strict Mode?

Author: Jean-marie CléryStatus: PublishedQuestion passed 2093 times
Edit
2
Community Evaluations
developer avatar
Nguyen
09/05/2024
Among the statements you provided: True: Strict Mode prohibits the use of octal notation on numbers. So, var a = 015; would indeed throw an error in Strict Mode. True: Strict Mode improves the security of the eval() function by allocating a dedicated scope to it. This helps prevent unintended variable leaks. True: Strict Mode forbids explicitly writing a variable in the window object. So, window.foo = 'bar'; would be disallowed in Strict Mode. True: Strict Mode throws an error if semicolons are forgotten. It enforces stricter syntax rules.
developer avatar
Auteur anonyme
15/08/2024
I don't see any error If I don't add semicolon to a code.