Every test are passing in my project. But when the test tests the project with 5 *-+5
operation, the #test’s 13 failed. How can I avoid those operators combinations?
Project Link: https://codepen.io/AndrewAung11/pen/WNpQpMZ
Thank you.
Every test are passing in my project. But when the test tests the project with 5 *-+5
operation, the #test’s 13 failed. How can I avoid those operators combinations?
Project Link: https://codepen.io/AndrewAung11/pen/WNpQpMZ
Thank you.
Hello AndrewAung11,
Possible suggestion when adding to eq Array.
For the operators - you could test for last value in array and if it is not a number then do replace the operator with current operator.
@jaket Thank you, your comment give me the hint to check if the word before it is a minus sign before appending another operator.
glad to help - happy coding
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.