Hi i'm making a String Calculator and all it currently does is add. I'm using coffeescript and in the code provided finalnum is 0, operator is '+' and it's iterating through an array of integers. I plan on adding more operators later and am looking for a simpler way (not a massive if else) to quickly change a string to it's corresponding operator. Thanks for your help!
for num in equation_array
finalnum = finalnum operator num