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
The error occurs because you need to declare the variable.
'use strict'; var foo = 'Guilherme'; // It works!
Now it works!