Hard
Which statements are true about JavaScript Strict Mode?
Author: Jean-marie CléryStatus: PublishedQuestion passed 2003 times
Edit
2
Community Evaluations
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.
Similar QuestionsMore questions about Javascript
8
Which of the following equality(s) are true? 0 == '', 'f' + 1 == 'f1'7
Write a Javascript code that prints the indexes of an array.6
Invert a string in Javascript6
Which of the following is the **most optimized** method for creating a literal object?5
What is the value of `obj.hello` after executing these few lines of code?