Answers for "how to define a string in a function definition"

1

how to create a function from a string

var addition = Function("a", "b", "return a + b;");
alert(addition(5, 3)); // shows '8'
Posted by: Guest on December-15-2020

Code answers related to "how to define a string in a function definition"

Code answers related to "Javascript"

Browse Popular Code Answers by Language