{"id":4817,"date":"2017-06-09T04:57:27","date_gmt":"2017-06-09T08:57:27","guid":{"rendered":"http:\/\/local.brightwhiz\/?p=4817"},"modified":"2021-12-08T12:02:13","modified_gmt":"2021-12-08T17:02:13","slug":"equality-operators-javascript","status":"publish","type":"post","link":"http:\/\/local.brightwhiz\/equality-operators-javascript\/","title":{"rendered":"A Tale of Two Equality Operators (== vs ===) in JavaScript and PHP"},"content":{"rendered":"\n
Before you run off and write to the JavaScript<\/a> and PHP<\/a> maintainers to complain about a type or syntax error or duplication or whatever it is good to note that there is no mistake with the equality operators in these languages.<\/p>\n\n\n\n As a matter of fact the ==<\/code> vs
===<\/code> operators have their place and even go by different names. The Equality operator (
==<\/code>) is definitely different from the identity operator (
===<\/code>). Now if they both behave the same, why do we need two operators to do the same thing? I guess that is why you are here to find out, and we won’t disappoint you.<\/p>\n\n\n\n