[Solved] Javascript eval() function not working properly [closed]
There are a whole bunch of reasons why this is the wrong approach. First, innerHTML returns a string containing, not only the text content of an element, but also any nested HTML elements as well. If it’s just the text you want, use textContent. Next, by having the user input the actual math operator they … Read more