Answers for "declare string variable javascript"

1

js var in string

// in your string you can call your variable like ${myVar}. eg:
var myVar = "blue";
console.log("The sky is " + myVar + ".");
// Output: "The sky is blue."
Posted by: Guest on February-11-2021
-2

js variable html

<div onload="document.innerHTML(name + ' is ' + age)">
Posted by: Guest on April-14-2020

Code answers related to "declare string variable javascript"

Browse Popular Code Answers by Language