What is use strict in javascript?

What is use strict in javascript?

Search for: What is use strict in javascript?

John Resig's comments on use strict and a few other JS 5 features

It catches some common coding bloopers, throwing exceptions.

It prevents, or throws errors, when relatively ?unsafe? actions are taken (such as gaining access to the global object).

It disables features that are confusing or poorly thought out.


function imStrict(){
  "use strict";
  // ... your code ...
}