I was trying to do maths based on variables and use the outcome. The input sometimes has padding with leading zeroes at the start of it. Today while debugging my code I have found out the following;
eval("1*010 + -9")
evaluates to -1 while eval("1*10 + -9")
evaluates to 1
I do not have any idea how this could be possible since these following evaluations work as intended
eval("1*009 + -9")
evaluates to 0
eval("1*011 + -9")
evaluates to 2
Any explanation would be helpful, thanks for sharing your time.