switch (month) { case 2: if(isLeapYear) days = 29; else days = 28; break; case 4: case 6: case 9: // do the same thing case 11: days = 30; break; default: days = 31; }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter