executing mathematical operations inside a list(values in a list are strings) Javascript

后端 未结 0 2057
予麋鹿
予麋鹿 2021-02-08 19:56

I have a list like this [\'1\', \'+\', \'2\', \'-\', \'3\'] and I want to calculate the result of the expression like this 1+2-3 which is equal to zero. How can I do that?

相关标签:
回答
  • 消灭零回复
提交回复
热议问题