Why does parseInt() return NaN for “08” in JavaScript?
Body:
I’m trying to convert a string to an integer in JavaScript using the parseInt() function. It works as expected for most inputs, but returns NaN when I try to parse “08”. Here’s the code I’m using: