请解释此代码不起作用的原因

Please explain the reason for this code not working

下面给出的代码应该根据输入值给出不同的输出,但它不起作用。

function myFunction() {
  let x = document.getElementById("demo").value;
  let y;
  if (x == "") {
    y = "The field is Empty";
  } else if (isNaN(x)) {
    y = "Input is not a number";
  } else if (x < 5) {
    y = "The number is too low";
  } else(x > 10) {
    y = "The number is too big";
  }
  document.getElementById("p01").innerHTML = y;
}
<input id="demo" type="text">
<button type="button" onclick="myFunction()">Test Input</button>
<p id="p01"></p>

您在 else 语句中设置了一个条件:else (x > 10) 这是无法完成的。将其更改为 else if (x > 10),您应该可以开始了。