js switch case语句怎么写

js switch case语句怎么写

用 switch(true) 可能能实现你的需求。switch( true ) { case x &gt1 : breakcase x == 1 : breakcase x &lt1 : break}或者,如果两个case执
JavaScript100