Hello,
I'm doing a bit of experimentation and would like a bit of advice if possible please.
In my switch statement I would like to use the || or operator, it works correctly it I set the case to 31, but if I try 1||31 it doesn't.
If anyone can shed some light on this I'd appreciate it.
ThanksCode:myDate = new Date(); myMonth = month[myDate.getMonth()]; myDay = myDate.getDate(); dayAddon= null; myWeekDay = weekday[myDate.getDay()]; switch(myDay){ case (1 || 31): dayAddon = "st"; alert(dayAddon); break }





Bookmarks