Mega Code Archive

 
Categories / JavaScript Tutorial / Operators
 

Identically Equal and Not Identically Equal

The identically equal and not identically equal operators do the same thing as equal and not equal, except that they do not convert operands before testing for equality. The identically equal operator is represented by three equal signs (===) and only returns true if the operands are equal without conversion. var sNum = "55"; var iNum = 55; alert(sNum == iNum);    //outputs "true" alert(sNum ==="iNum);   //outputs "false"">