JavaScript Strict Mode

In order to find and remove any silent error in a JavaScript code, “use strict”; expression is used. This expression is placed as the first statement in the code to enable the strict mode of debugging.

Note: It will throws an error if there is there any silent error in the JavaScript code.


<!DOCTYPE html>
"use strict"; 
a = 2;  
b = 5;  
mul = a * b;  


Type of a and b is not defined.
Please follow and like us:
Content Protection by