cmdrkeen to Programmer Humor · 1 year agoThe Holy Trinity of JavaScriptimagemessage-square72fedilinkarrow-up1736arrow-down111
arrow-up1725arrow-down1imageThe Holy Trinity of JavaScriptcmdrkeen to Programmer Humor · 1 year agomessage-square72fedilink
minus-squareEphera@lemmy.mllinkfedilinkarrow-up1·1 year agoThe == operator in JS will try to cast the things being compared and do all kinds of ‘smart’ assumptions about what equality means. This is why everyone uses === instead…
The
==
operator in JS will try to cast the things being compared and do all kinds of ‘smart’ assumptions about what equality means. This is why everyone uses===
instead…Unless you enjoy inviting the chaos.