var age = 20
if(age>=18){
console.log("已成年")
}
var age = 20
if(age>=18){
console.log("已成年")
}
else{
console.log("未成年")
}
age >=18? console.log("成年人") : console.log("未成年")
var age = 20
if (age >= 18){
console.log("已成年");}
else if (age >= 12 && age <18){
console.log("青少年");}
else{
console.log("小朋友");}