In this example of JavaScript switch statement, we will pass new Date().getDay()
to switch statement and if the value is 0 it will return Sunday and if value is 6 it will return "Saturday" if the values is not 0 or 6 then it will execute default test case and output as "Looking forward to the Weekend" See the code snippet: