+ 1
strict mode enables strict features in the v8 engine. Short example of some features: You can enable it globally by writing: 'use strict'; // strict mode enabled! Per function you just include in function: let myfunc = () => { 'use strict'; // strict mode enabled b = 0; // broke } * You MUST declare a variable before using it (sane imo): var x; x = '0'; // ok y = '';. // not ok * es6 features are enabled (this is browser dependent), for node v4+ this is important. * Performance, in some cases, is better. Tere are more features as well, I'd check stack overflow for more!
27th Nov 2016, 9:05 AM
Jared Allard
Jared Allard - avatar