Skip to content

howdykevin/ReactJavascriptCalculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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