Relative Content

Tag Archive for javascriptarrayscalculator

Changing the logic for working with an array

Maybe someone can help me solve the “Calculator” problem. My project was supposed to be a regular calculator, but now I need to make an “Engineering” one. I don’t know how to make it so that there is no hard binding in the function. “equals” expects only two operands and one operator, making it impossible to handle more complex expressions and the display needs to show the entire entered expression, and not just the last entered element. (Adding parentheses to an expression).