A calculator in javascript