@_devJNS 017 is treated as octal due to the leading 0. 018 can't be octal because 8 isn't a valid digit in octal, so it's treated as decimal.
One more reason Javascript's design is stupid. Invalid octal should be an error, not silently be treated as decimal.
@Mukherjea@Mr_Husky1 What a terrible take. I sure hope you're not a parent, and don't plan on being one.
Holding a kid accountable for his actions isn't being authoritarian. It's just good education.