I want to use eval to calculate the following string with multiple varaibles
I have all the variables stored in my object
let myVars = {
a : 10,
b : 20,
c : 30,
}
let str = "a+b+c+10"
// how to evaluate the string ...
Blancer.com Tutorials and projects
Freelance Projects, Design and Programming Tutorials
I want to use eval to calculate the following string with multiple varaibles
I have all the variables stored in my object
let myVars = {
a : 10,
b : 20,
c : 30,
}
let str = "a+b+c+10"
// how to evaluate the string ...