Question du test Javascript

Quelles affirmations sont vraies à propos de JavaScript Strict Mode?

Difficile

Quelles affirmations sont vraies à propos du mode strict de JavaScript ?

Auteur: Jean-marie CléryStatut : PubliéeQuestion passée 2019 fois
Modifier
2
Évaluations de la communauté
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.