let today = new Date(); let currentDay = today.getDay(); let day = ""; switch (currentDay) { case 1: day = "Monday"; break; case 2: day = "Tuesday"; break; case 3: day = "Wednesday"; break; case 4: day = "Thursday"; break; case 5: day = "Friday"; break; case 6: day = "Saturday"; break; case 0: day = "Sunday"; default: console.log("Error: Current day is equal to: " + currentDay); break; }
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