JavaScript - Strict Mode
To ease the transition to the latest versions of JavaScript, without breaking existing pages, you can specify that your code runs in strict mode.
You can run the entire script on strict mode by prepending it with "use strict";
.
"use strict";
// your code
You can also specify strict mode on a function-by-function basis.
function () {
"use strict";
// your code for the function
}
Further Help
You can find a discussion of strict mode on the Mozilla Developer Network Strict Mode page.