“JavaScript Wykonaj kod ciągu” Kod odpowiedzi

JavaScript Wykonaj kod ciągu

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

var F=new Function (theInstructions);

return(F());
Misty Markhor

JS Wykonaj ciąg

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. 
Dark Horse

Odpowiedzi podobne do “JavaScript Wykonaj kod ciągu”

Pytania podobne do “JavaScript Wykonaj kod ciągu”

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu