top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What's the difference between a '==' and a '===' in context of JavaScript and why is this necessary?

+4 votes
607 views
What's the difference between a '==' and a '===' in context of JavaScript and why is this necessary?
posted Feb 25, 2015 by Merry

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+2 votes
 
Best answer

Equal Value : " == "
Equal Value and Equal Type: "==="

Example:
var a='1';
var b=1;
if(a==b)
{
alert('double Equals');
}

if(a===b)
{
alert('triple Equals');
}

answer Feb 25, 2015 by Balamurugan Kn
...