I am testing something in Javascript and when comparing 2 values in if statement like == or === returning different. Could somebody explain to me difference between these 2 comparisons?
Asked
Active
Viewed 50 times
0
-
1Look at the second related question http://stackoverflow.com/questions/359494/does-it-matter-which-equals-operator-vs-i-use-in-javascript-comparisons?rq=1 in the right of the page – Irvin Dominin Jul 23 '13 at 15:19
-
See `Equal (==)` and `Strict equal (===)` in the table [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators). – ajp15243 Jul 23 '13 at 15:20
-
This gives a pretty good description. [1]: http://stackoverflow.com/questions/359494/does-it-matter-which-equals-operator-vs-i-use-in-javascript-comparisons – mwhobrey Jul 23 '13 at 15:21