javascript - How to take the string value out of its scope(unstring)? -


i have looked through string methods, couldn't find method throw string value out of scope. there function unstring string in javascript? instance if receive calculation in string form file:

var 5 = 5 var 3 = 3 var calculation = 5 * three; var string = 'calculation * 1232123 - 5 + three'; 

how can store received string in variable values out of string scope , calculated? there way or there method so?

you can use eval function. remember, eval evil.


Comments

Popular posts from this blog

mysql - FireDac error 314 - but DLLs are in program directory -

git - How to list all releases of public repository with GitHub API V3 -

c++ - Getting C2512 "no default constructor" for `ClassA` error on the first parentheses of constructor for `ClassB`? -