Recently, I ran some of my JavaScript code through Crockford\'s JSLint, and it gave the following error:
Problem at line 1 character 1: Missing \"use
Normally, JavaScript does not follow strict rules, hence increasing chances of errors. After using "use strict"
, the JavaScript code should follow strict set of rules as in other programming languages such as use of terminators, declaration before initialization, etc.
If "use strict"
is used, the code should be written by following a strict set of rules, hence decreasing the chances of errors and ambiguities.