how to create a calculator in javascript