The Startup
Published in

The Startup

JavaScript: Double (==) vs Triple (===) Equals

If you have a JavaScript interview coming up soon, be prepared to answer one of the most frequently asked questions: “What is the difference between using “==” and “===” operator?”. Here is the answer:

The “==” operator is known as loose, abstract, or type converting equality operator and it automatically converts one type to another if two variables are not of the same type. Comparing the two values only after converting them into the same type is called type coercion. On the other hand, the “===” operator is known as a strict equality operator and…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store