Reading from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions_and_function_scope/Strict_mode if you put 'use strict' outside a function block it will just take the whole script.