Hey everyone,
I’m struggling to get my calculator to do the proper mathematical operations once I hit the equals button. Currently, when I hit equals, my calculator should be trying to evaluate a string that looks like this, for example: "333+222*4+111/4"
I was thinking about splitting that string into an array and then figuring out how to evaluate it that way, however, I’m having issues splitting it and maintaining the mathematical operators inside, in their proper order/locations.
I found a library online called math.js, it can take my mathematical string and evaluate it… Am I cheating using a library like this in my project?