Skip to content

danielrob/calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Javascript Calculator

Implemented with respect to the following criterion:

  1. No use of eval().
  2. Vanilla javascript (ES5) only.

The implementation uses regex recursively against the key-input.

There is a no-number-coercion branch which contains a (more convoluted) implementation with the additional constraint of not coercing numbers to strings and vice versa (except for final display).

Demo

See it in action here.

Tests

E2E style tests with jasmine & karma. Key-input is tested against the expected screen output. Bug reports welcome.

Credits

All credit to @GeoffStorbeck for the design and its implementation. This was a FreeCodeCamp zipline exercise.

About

A raw javascript calculator implementation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published