7 + 8 === 7 in JavaScript » Debuggable Ltd - 0 views
-
JavaScript assumes that any 0-prefixed string ought to be referring to an octal number. This will not become apparent until your string represents an invalid octal such as '08'. So in order to outsmart this "feature" you have to explicitly provide the base for your integer: