ECMAScript 5 (ES5) strict mode

Internet Explorer 10 and Windows Store apps introduce support for ECMAScript 5 (ES5) strict mode, as specified in the ECMAScript Language Specification, 5th edition.

ECMAScript is the emerging standard for JavaScript, defined by the ECMA-262 specification. The fifth edition was published in December 2009, and adds strict mode. Strict mode is intended to improve error checking and to identify script that might not be resilient to future versions of JavaScript. ES5 strict mode is a more restrictive variant of JavaScript that has different semantics and stricter parsing from what is considered normal JavaScript.

Opting into strict mode

To use strict mode, you must opt in by including the following statement before scripts or functions.

"use strict";

For more information about ES5 strict mode from Ecma International, download the ECMAScript 5 specification and look at the Annex C section, called "The Strict Mode of ECMAScript."

Samples and tutorials

Strict Mode

Internet Explorer Test Drive demos

Try Strict

Specification

ECMAScript Language Specification, 5th edition