📜  用于比较更大值的开关 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:14.110000             🧑  作者: Mango

代码示例1
var scrollleft = 1000;
switch (true)
{
    case (scrollleft > 1000):
      alert('gt');
      break;
    case (scrollleft <= 1000):
      alert('lt');
      break; 
}