javascript - 0 + integer is weird in JS -


this question has answer here:

go browser's js console , try these:

-14 // -14  -014 // -12  -24 // -24  -024 // -20  -0024 // -20  012 // 10 

why 0-integer construct giving me results 2 smaller in absolute value?

"never write number leading 0 (like 07). javascript versions interpret numbers octal if written leading zero." (see: http://www.w3schools.com/js/js_numbers.asp)


Comments

Popular posts from this blog

Python Kivy ListView: How to delete selected ListItemButton? -

asp.net mvc 4 - A specified Include path is not valid. The EntityType '' does not declare a navigation property with the name '' -