About strict mode
Invoking strict mode
Now that you already know how to invoke strict mode, let’s see a quick example.
'use strict'; foo = 'Guilherme'; // ReferenceError
You need to declare the variable.
'use strict'; var foo = 'Guilherme'; // It works!
Now it works!