JavaScript Strict Mode

The Strict mode is a way of checking error in your code. The strict mode "use strict"; which defines that JavaScript code should be executed in "strict mode". The main purpose of strict mode is to check more deeply JavaScript code, and remove the vulnerability on the code.

Declaring Strict Mode :

The strict mode is declared by adding "use strict"; to the beginning of a script or a function. It is declared at the beginning of a script and it has global scope. Example :
  <title>String Operators</title>
  <script type="text/javascript">
    "use strict";
    var str = "This is First String. ";
    var x = 200;
    var mystr = str + x;
Output :

Next Topic :