i'm having this js code and i can't understand why does the last number is 12 and why it starts counting from 8. Why doen't it strat from 10 and end at 14?
for (k=010; k<015; k++)
0 at the start of your numbers causes the language to interpret them as base 8 ("octal") values.
If you remove the leading
0 characters from your numbers, it will work.
The use of a leading
0 to indicate octal dates back to (at least) C.