News for hackers. Stuff that matters.
Re:JavaScript Equality Minesweeper by sdegutis on Monday September 17, 2018 @10:11AM (#18006061)
The types are there, are to some extent you always have to rely on them. You can't call .push() on a string, or pass a number to Object.keys(). I can't imagine a situation where using == even works as you expect it to, aside from comparing numbers and strings that contain numbers. In which case the string should be converted to a number at the user input edge, as part of (but not the entire) input normalization, sanitation and validation phase.

There are no comments on this comment yet.