js variable in html code example
Example 1: js variables
let numberOfFriends = 1;
numberOfFriends += 3;
const minimumAge = 21;
true;
false;
let isHappy = true;
let numberOfChickens = 6;
Example 2: js variable html
<div onload="document.innerHTML(name + ' is ' + age)">
Example 3: js var
var a = 'A';
var b = a;
var a, b = a = 'A';
Example 4: js var
var a = 1;
b = 2;
delete this.a;
delete this.b;
console.log(a, b);
Example 5: html define javascript variable
<script>
var Number = 5;
var String = "Hi!";
var boolen1 = true;
var boolen2 = false;
var array = [11, "Hi!", true];
var object = {age:11, speach:"Hi!", likes_Bananas:true};
</script>