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

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -