Skip to content

Latest commit

 

History

History
20 lines (17 loc) · 887 Bytes

File metadata and controls

20 lines (17 loc) · 887 Bytes

ReactJavascriptCalculator

Created with CodeSandbox

Objectives:

Create a calculator using React Framework

Libraries used:

  1. react
  2. react-dom
  3. react-scripts

Functionalities:

  • Working values and result values are always displayed
  • Pressing AC button clears input and output values. Calculator returns to default state
  • Number cannot begin with multiple zeros
  • Any operation (+,-,*,/) can be performed on a chain of numbers of any length and numbers containing decimal points. The correct result will be produced.
  • Two '.' in one number is not accepted
  • If 2 or more operators are entered consecutively, the operation performed should be the last operator entered
  • Pressing an operator immediately following "=" should start a new calculation that operates on the result of the previous evaluation
  • Round values to 4 decimal places