Use eval instead.

I rewrote the script. The calculator now displays the numbers as they are pressed.
You can check it out here - http://jamesdavidson.github.io/jscalc