javascript create function from string code example
Example 1: javascript function from string
var addition = Function("a", "b", "return a + b;");
alert(addition(5, 3)); // shows '8'
Example 2: new function javascript
var add = function(num1, num2) {
return num1 + num2
}