What is strict mode in JavaScript

Strict mode is a ECMAScript 5.1 feature used mainly for testing and debugging.
when enabled the JavaScript engine catches more errors among others undeclared variables, duplicate object properties.
How to enable strict mode,
In your code include;
'use strict';
You can put the declarative on the top most line anything that comes after it will be handled in a strict manner.

Comments

Popular posts from this blog

FlappingBird Postmortem (JS13K)

JavaScript introduction to variables

FlappingBird JS13K Games

How to target all elements of a given class name in JavaScript

Zedplug will be decommissioned on November 30th