DEV Community

Discussion on: How JavaScript engine execute this code?

Collapse
 
dizefurkan profile image
Said Furkan Dize

Hey,

Check out the "use strict".
It's throw an error when you try to declare an variable without "var", "const" or "let"

Collapse
 
uddeshjain profile image
Uddesh

That's a different case.

Thread Thread
 
dizefurkan profile image
Said Furkan Dize

No man. You gived an example on your vomment. That's why i wrote that comment.
When you use strict you cant declare an variable like: "a: 10"