execute string as javascript code example
Example 1: javascript execute string code
var theInstructions = "alert('Hello World'); var x = 100";
var F=new Function (theInstructions);
return(F());
Example 2: eval in javascript
eval() -> is able to evalute the things inside it , like eval(a+b+c) , wher a=3,b=4,c=4 , so eval(a+b+c) = 11