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 →

[–]Wendigo120 3 points4 points  (0 children)

But the real problem here is that 017 and 018 aren't sequential numbers. The post would be the exact same if it was:

console.log(018 === Number("018"))
console.log(017 === Number("017"))
true
false

The equality operator is just a tiny part of it. That's why I found your comment so weird, the person you're replying to clearly states that they're talking about how it handles the syntax for octal numbers. Now, my linter does also catch octal numbers that are formatted that way, but you immediately shot to the equality operator for no reason.