if if-else
var distance = prompt("请输入距离");
if (distance > 0 && distance <= 400) {
console.log("24家");
} else if (distance > 400 && distance <= 1000) {
console.log("30家");
} else if (distance > 1000 && distance <= 3000) {
console.log("40家");
} else if (distance > 3000 && distance <= 5000) {
console.log("100家");
} else if (distance > 5000) {
console.log("100+家");
}
var score = prompt("请输入你的高考分数");
if (score < 480) {
console.log("其他大学")
}else if (score >= 480 && score < 540) {
console.log("普通大学");
} else if (score >= 540 && score < 630) {
console.log("工程大学");
} else if (score >= 630) {
console.log("华科大学");
}
var working_years = prompt("请输入你的工龄");
if (working_years < 1 && working_years >= 0) {
console.log("3天年假");
} else if (working_years >= 1 && working_years < 3) {
console.log("5天年假");
} else if (working_years >= 3) {
console.log("15天年假");
}