I have an issue with the Javascript calculator project, specifically on issue 9. Currently, my calculator supports calculations with negative numbers by making it so that if a negative number is pressed with said intent, it uses negator and calculates accordingly so that negative numbers can be calculated.
However, to concatenate functions so that test 9 passes, I’m required to calculate after each button press. Basically, I can either pass test 9, or 13, but never both. I would appreciate any help, I am not exaggerating when I mean I’ve spent over 8 hours trying to debug this and I’m losing my mind.
- Yes, I’ve attempted string concatenation and eval three times, no it does not work long term unless I want to completely rewrite the code logic.
- I’ve already asked to StackOverflow, I was only told “use eval” and nothing else.
- I’ve already looked through the other issue cases in this Forum, none aid.
Link to my code pen is here: https://codepen.io/DanitzaFuenzalida/pen/BaXKrKZ?editors=1111