Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

if else if

var age = prompt("enter your age")
if (age>= 60){
    console.log("you are older")

}
else if (age >=18){
    console.log("you are adult")

}
else if (age < 18){
    console.log("you are child")
}
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
2+7 =