| |
|
What are different aspects of Script Mode in JavaScript and how can we enable it? Question Posted on 12 Apr 2022 Home >> JavaScript >> JavaScript Questions >> What are different aspects of Script Mode in JavaScript and how can we enable it? |
What are different aspects of Script Mode in JavaScript and how can we enable it?
In JavaScript strict mode is the way to introduce better error-checking into our code. Below are the two way to enable it:-
(1)While using strict mode we cannot use implicity declared variables or assign a value to a read-only property or add a property to an object that is not extensible.
(2)To enable strict mode you need to add "use strict" at beginning of a file, a program or a function. | |
|
|
|
|