However, if "strict mode";
is active, accessing undeclared variables throws an exception:
Assignments, which would accidentally create global variables, instead throw an error in strict mode:
'use strict';
// Assuming a global variable mistypedVariable exists
mistypeVariable = 17; // this line throws a ReferenceError due to the
// misspelling of variable