# Bug on project Calculator

**URL:** <https://forum.freecodecamp.org/t/bug-on-project-calculator/169521>\
**Category:** General\
**Created:** [January 18, 2018, 4:59pm UTC](https://forum.freecodecamp.org/t/bug-on-project-calculator/169521 "2018-01-18T16:59:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ivanilievski](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ivanilievski/32/39446_2.png) [@ivanilievski](https://forum.freecodecamp.org/u/ivanilievski)\
**Post date:** [January 18, 2018, 4:59pm UTC](https://forum.freecodecamp.org/t/bug-on-project-calculator/169521/1 "2018-01-18T16:59:01Z")

</div>

Hi

I am working on the Calculator Project and i am stuck on user story where you need to add multiple operating signs until you click equals.

> Blockquote  
> User Story: I can keep chaining mathematical operations together until I hit the equal button, and the calculator will tell me the correct output.  
> Blockquote

Can you help me figure this out. Here is the project, feel free to give me any suggestions on my code so far.

[https://codepen.io/ivanilievski/pen/bajEzL](https://codepen.io/ivanilievski/pen/bajEzL)

I already have done two unsuccessful attempts that are commented

> Blockquote  
> //This is my attemp to solve the problem 7-6+2

---

<div class="post-metadata">

**Author:** ![TrevorCostello](https://avatars.discourse-cdn.com/v4/letter/t/f0a364/32.png) [@TrevorCostello](https://forum.freecodecamp.org/u/TrevorCostello)\
**Post date:** [February 25, 2018, 2:15am UTC](https://forum.freecodecamp.org/t/bug-on-project-calculator/169521/2 "2018-02-25T02:15:03Z")

</div>

This is going to take a bit of a paradigm shift on how the calculations are done… It will only take the first num, operator, second num and return that result based on those if statements…

What I would try is something along the lines of catching the numbers + operators without doing the calculations that way and return and eval of the display output. Just be careful with how the operators return, be sure to check the console log and see if they come in right… 7-6+2-5+6 will run but 7"-“6”+"2… etc wont!

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 17, 2021, 8:26pm UTC](https://forum.freecodecamp.org/t/bug-on-project-calculator/169521/3 "2021-01-17T20:26:02Z")

</div>

Closed on January 17, 2021, 8:26pm UTC


