Here is a small JavaScript. I'm getting unexpected results from the function. 020*2 gives 32 instead of 40. Does anybody know how to fix this??
function myFunction(a, b) {
return a * b;
}
document.write('04 * 03 = ');
document.write(myFunction(04, 03)); //Result 12, correct
document.write(' << Correct <br/>020 * 02 = ');
document.write(myFunction(020, 02)); //Result 32, wrong - expected result 40
document.write(' << Expected 40 here');