0
How do I return the result of my calculator?
https://code.sololearn.com/WWsM8jajToBX/?ref=app Every time a number or operator button is pressed, it is added to an array that acts as the memory. The array consists of strings of what the user types in ie [â3â , â+â , â3â] Then when the user presses the equal button, I want the array form into one string using the join() method ie [â3+3] Then I want to use the eval function to convert it into numbers and return an answer. 3+3 result: 6 But so far the only thing that returns is undefined. Please help.
1 Answer
0
https://code.sololearn.com/WWsM8jajToBX/?ref=app
Like this?
I think I did what you said correctly, but I must be missing something because it still returns undefined. Iâll keep trying.