Please note, this is a STATIC archive of website www.tutorialrepublic.com from September 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JavaScript Switch Case Statement with Default Clause on Top</title> </head> <body> <script> var d = new Date(); switch(d.getDay()) { default: document.write("Looking forward to the weekend."); break; case 6: document.write("Today is Saturday."); break; case 0: document.write("Today is Sunday."); } </script> </body> </html>