Calculator written in Javascript