DEV Community

Discussion on: Is there a reason to use == over ===?

 
faaktap profile image
Fakie Tap

I did a quick grep - and I see there is some place where I use ===

if (!response.constructor === Array)
if (this.photoPath === undefined)

But I use == much more frequently
Never realised that 0 == false and '0' == true - that is a nasty one.

But I've never when debugging, had an error related to == vs ===
Lucky or dumb, or dumb luck I guess?