harsh98trivedi / Simple-JavaScript-Calculator

Simple JavaScript Calculator by Harsh Trivedi
https://harsh98trivedi.github.io/Simple-JavaScript-Calculator/
MIT License
170 stars 169 forks source link

Order of Operations Error #23

Closed amolgorithm closed 1 year ago

amolgorithm commented 1 year ago

If I inputted 3 + 4 and pressed equal, I got 7. Then, when I clicked 3, I would need to get 7 3. But instead, I got 3 + 4 * 3. If there was brackets in the right spot, that would be okay, but there were no brackets. So I received the wrong answer 15, instead of 21. Here is a video of that:

https://github.com/harsh98trivedi/Simple-JavaScript-Calculator/assets/123842348/b45373d0-6fd3-4123-97a0-3e9e872b9a02