JavaScriptIntermediate#fundamentals

What is strict mode?

'use strict' (implicit in modules and classes) forbids undeclared variables, makes silent failures throw, sets this to undefined in plain function calls and disallows duplicate parameter names.

Example
'use strict';
x = 5; // ReferenceError instead of creating a global

Related Questions

1
JavaScriptBeginner#fundamentals#types

What are the data types in JavaScript?

Open
2
JavaScriptBeginner#scope#es6

Difference between var, let and const?

Open
3
JavaScriptBeginner#scope

What is hoisting?

Open