Calculator program in Javascript