String para codificar JavaScript
var theInstructions = "alert('Hello World'); var x = 100";
var F=new Function (theInstructions);
return(F());
Different Deer
var theInstructions = "alert('Hello World'); var x = 100";
var F=new Function (theInstructions);
return(F());
var theInstructions = "alert('Hello World'); var x = 100";
var F=new Function (theInstructions);
return(F());
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.
function ExecuteJavascriptString()
{
var s = "alert('hello')";
// how do I get a browser to alert('hello')?
}