Математика из строки JS

// Warning: Executing JavaScript from a string is an enormous security risk.
// It is far too easy for a bad actor to run arbitrary code when you use eval()

// Example
console.log(eval('2 + 2')); // 4
Jarett Sisk