what is use of var in javascript code example
Example 1: js var
var a;
console.log(a); // scrive in console "undefined" o "" a seconda del browser usato.
console.log('still going...'); // scrive in console "still going...".
Example 2: var javascript
var text = "";
var i;
for (i = 0; i < 5; i++) {
text += "The number is " + i + "<br>";
}