Answers for "convert string to code js"

121

string to number js

var myInt = parseInt("10.256"); //10
var myFloat = parseFloat("10.256"); //10.256
Posted by: Guest on July-23-2019
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
2

javascript number to string

const toNumber = str => +str;

// Example
toNumber('42');     // 42
Posted by: Guest on July-03-2020
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

Code answers related to "Javascript"

Browse Popular Code Answers by Language