The equality operator consists of two equal signs: ==
It returns true if the two things being compared evaluate to the same value.
Don't confuse it with the assignment operator, which consists of one equal sign: =
Code:
<script type="text/javascript">
//<![CDATA[
a = 2;
b = 2;
c = 5;
document.write("a == b : ", a==b, "<br />");
document.write("b == c : ", b==c, "<br />");
//]]>
</script>
Output: