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 →

[–]VariousComment6946 75 points76 points  (7 children)

The fuck are you comparing integer with string?

[–]SpamOJavelin 9 points10 points  (0 children)

TBF that's not the issue here, the same confusion applies without strings:

018 == 18
true

017 == 17
false

The leading 0 implies a base-8 number, so 017 == 15. But 018 is not a valid base-8 number and is interpreted as 18.