js variables with html code example
Example 1: js variable html
<div onload="document.innerHTML(name + ' is ' + age)">
Example 2: how to create variables using javascript
var myVar; //unitialized variable( can be intiallized later )
var number = 1; //number
var string = " hello world " ; //string
var boolean = true ; //boolean
myVar = function(){ //variable can hold function
};