N
N
Nikita Gladkiy2017-05-12 11:15:01
JavaScript
Nikita Gladkiy, 2017-05-12 11:15:01

How to parse input on the command line?

Application on Node.Js. The user enters a sequence of arithmetic operations, for example, 5+7-4. The program calculates the result. What can be used to parse this input and decompose it into components?
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anvar Shakhmaev, 2017-05-12
@Techniker753

The user enters a sequence of arithmetic operations

var result = eval("5+7-4");

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question