strict mode example
Here’s an example of using “use strict”:
x = 10; // ReferenceError: x is not defined
y = 20; // ReferenceError: y is not defined
In the above example, both x and y are not declared with var, let, or const and are therefore considered global variables. When the code is run in strict mode, a ReferenceError is thrown, indicating that the variables are not defined.