Last Updated: February 25, 2016
·
574
· netzzwerg

Test for strict mode

Can we have strict mode?

(function(){
  "use strict";
  var is_strict = (function() {
    return !this;
  }());
  console.info(strict);
})();

Is strict mode active?

var can_strict = (function() {
  "use strict";
  return !this;
}());