how to add if in html code example
Example 1: javascript if else
var age=20;
if (age < 18) {
console.log("underage");
} else {
console.log("let em in!");
}
Example 2: javascript if and statement
let a = 1;
let b = 2;
if(a == 1 && b ==2){
// Code here
}