Editor Arrow Download Open
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>JavaScript Switch Case without break</title> </head> <body> <pre> <!-- Use pre element for work document.writeln() method --> <script> var weekname = "wednesday"; switch (weekname) { case "monday": document.writeln("Monday working day."); case "tuesday": document.writeln("Tuesday working day."); case "wednesday": document.writeln("Wednesday government holiday."); case "thursday": document.writeln("Thursday working day."); case "friday": document.writeln("Friday is a last working day of the week."); case "saturday": document.writeln("Saturday week end."); case "sunday": document.writeln("Sunday week end."); default: document.writeln("No any case found."); } </script> </pre> </body> </html>
  Preview Arrow