Adding the basic JS logic for the calc

- Sequential coding used.
- Logic is kept extremely simple.
- Data type of decimal is ignored.