Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

use strict Directive

Restricts the use of some features in JavaScript. Supported in Internet Explorer 10 and Windows Store apps only.

use strict

The following code causes a syntax error because in strict mode all variables must be declared with var.

"use strict";
function testFunction(){
   var testvar = 4;
    return testvar;
}
intvar = 5;
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft