Wednesday, October 21, 2015

Strict in Java Script

What is Strict: 

Strict is not statement it is a literal expression which comes in Java Script 1.8.5 library. If we are using strict in java script file than it indicate code execute under strict mode.

Example:

"use strict"
i = 10;

This code will not execute. It will give the error because we have not declare i.

"use strict"
var i =10;

It will work because we have declare the i.