jquery Using ranges in switch cases?

后端 未结 4 819

Switch cases are usually like

Monday: 
Tuesday: 
Wednesday: 
etc. 

I would like to use ranges.

from 1-12: 
from 13-19:
fr         


        
4条回答
  •  离开以前
    2021-01-05 17:01

    Nope, you need to use an if/else if series to do this. JavaScript isn't this fancy. (Not many languages are.)

提交回复
热议问题