Visual Calculator with JavaScript
This calculator uses the prompt statement to ask the question, and the window.documentln() statement to display the answer to the user.
How it works:
The inputs are JavaScript prompts, and the outputs are writeln() statements.
Some cool features:
- The string-to-number conversion.
- While loops to force valid inputs.
- Life, the universe, and everything
Some notable exceptions:
- 0**0 is not allowed. Nor dividing by 0.
- Remainder (%) 0 returned Undefined rather than NaN.
- String values are not allowed in the numbers boxes.
- The operation box only allows it's specific characters, but will, however, allow for 'minus' instead of '-'. (Lowercase only)