//是否判断
var flag = false;
if(flag){
alert("flag为true");
}else{
alert("flag为false");
};
//多条件判断
var day = 3;
if(day == 1){
alert("day是1");
}else if(day == 2){
alert("day是2");
}else if(day == 3){
alert("day是3");
}else{
alert("day是大于3");
};
//嵌套判断
var f = true;
var h = 200;
if(f){
if(h > 100){
alert("h大于100");
}else{
alert("h小于100");
}
}else{
alert("false");
};