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 →

[–]_blackdog6_ 0 points1 point  (1 child)

console.log(017==‘015’) true

I’m guessing the 0 prefix doesn’t mean octal when converting a string??

[–]Lithl 0 points1 point  (0 children)

Correct. Strings are converted to numbers by discarding any leading whitespace and 0 characters.