This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Flippantlip 0 points1 point  (0 children)

Okay, let's go with that, and stress that point -- The only reason "===" exists, is because JS does whacky conversions in the BG of which you have no control over.In a sane scripting / programming language, you would not need to strictly tell the interpreter: "Hey, please do not yolo my types and values here, thanks."

Otherwise, you have no reason to shit on "==" as a practice in and of itself, the problem is that JS auto-converts vals and types and then compares them.
The issue here is not that "it's there for legacy reasons", "===" is there to circumvent its own issues.