stephen miller5,907 Points
quick question about operators
I took another course on js and jquery and the teacher explained that when using the 'equals operator' unlike Java, you use 3 equals signs === instead of 2. However in the console you were only using 2 and it was working fine, am i missing something? :0 thanks!
Niclas Valentiner8,947 Points
The difference between == and === is that === also compares the variable type.
var a = 1 var b = '1' a == b //returns true a === b // returns false, one is a string and the other is an integer
Jeremy Castanza12,075 Points
Generally speaking, you're better off using three equal signs. It'll get you into less trouble and will help you to debug your programs more easily.