所以我对JavaScript非常陌生。只是想知道为什么不执行此代码:
var x = 7
var y = 5
if (x < y) {
alert("x is less than y")
}
else {
alert ("x equal to y")
}
else if (x > y) {
alert("x is greater than y")
}
答案 0 :(得分:0)
if (x < y) {
alert("x is less than y")
} else if (x > y) {
alert("x is greater than y")
} else {
alert ("x equal to y")
}