In javascript, is it better to use two equal signs or three when ...
The == operator will compare for equality after doing any necessary type conversions. The === operator will not do the conversion, so if two values are not the same type === will simply return false. For me I generally always use === or !==, so as not to leave anything to chance. Share Improve this answer Follow answered May 19, 2013 at 11:09