math - Calculations in a sequential manner? -
I am creating a calculator in javascript. I have two means for the development of the operation. Use the first instrument eval method The second method that I have not completed, must be executed in sequential mode.
Example:
3-5x3 / 2
The code should not be executed before multiplying, but the result should be calculated sequentially, That is:
3-5 = -2 * 3 = -6 / 2 = -3
How can I do this?
I'm not sure how you implement it, but you have to bracket around each operation ) This way it can be sequential.
Comments
Post a Comment