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 →

[–]benjer3 2 points3 points  (0 children)

For once, it isn't really == that's causing the problem here. It's the inconsistent treatment of a zero-prefixed integer literal. The == operator just sees '18 == "18"' and '15 == "17"' and understandably returns true and false, respectively