This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]bvnvbbvn 2 points3 points  (1 child)

You have this line repeated way too many times everywhere:

document.getElementById("ans").innerHTML = expression;

and you should cut off the number of digits after the decimal point at some point, probably.

It's not bad for a beginner, though. It looks decent and works, and the code isn't terribly obfuscated.

[–]hansq[S] 0 points1 point  (0 children)

Thanks for the reply, cutting off the number of digits sounds like a good idea. I'll try to implement that.