Answers for "string to code javascript"

3

javascript execute string code

var theInstructions = "alert('Hello World'); var x = 100";

var F=new Function (theInstructions);

return(F());
Posted by: Guest on February-29-2020
0

string to code javascript

var theInstructions = "alert('Hello World'); var x = 100";

var F=new Function (theInstructions);

return(F());
Posted by: Guest on May-19-2021
0

string to code javascript

function ExecuteJavascriptString()
{
    var s = "alert('hello')";
    // how do I get a browser to alert('hello')?
}
Posted by: Guest on May-19-2021
0

js execute string

var myString = "console.log('I am Batman')";
eval(myString);
//carefull ! This will execute the code, therefore 
//be careful of where/how you got this string.
Posted by: Guest on May-26-2020

Code answers related to "string to code javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language