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>