@turtlecrab
Posted
hey, it does so because numbers starting with 0
are octal numeric literals in javascript(octal is like hexadecimal numbers but on base 8). You can disable them by putting 'use strict'
in the beginning of you js file, and it will throw syntax error instead of parsing them. I think it's better than returning incorrect(by human standards) computations. I hope it did help!
Marked as helpful
@BernardusPH
Posted
@turtlecrab Thank you, the syntax error is better than having random numbers as answers.