Why does strict mode in javascript allow you to create global variables in normal scope - when I enter some code line by line - I press enter in between

enter image description here

However - if I enter the entire code snippet in 1 go: then it throws a referenceError - like "use strict" should:

enter image description here

So how can I enforce the strict mode in chrome console - for all the statements I'm about to write after that??

0 Answers