Skip to content

yankouskia/smart-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

smart-calculator

Task

Your task is to implement class SmartCalculator. All methods in class should be chainable. The priority of different operations should be kept in mind. It means, that 2 2 * 2 is 6, not 8.

For example:

  const calculator = new SmartCalculator(2);

  const value = calculator
    .add(2)
    .multiply(2);

  console.log(value); // 6

Constructor should take initial value. Be sure, that all tests work with integers. Write your solution in src/index.js

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published