Well,
this is quite simple.
When you run this and switch gets hit, it prompts the user to input What the weather is like?
Window Prompt() in javascript means that everything in the window gets overboard by the prompt dialog or dialog, which asks the user to input based on the questions with a Ok and Cancel button, On click of Ok, the Case statements gets checked and the output message gets logged.
And based on the input by the user case is checked and output message is printed in the console log.
Fiddle[
^]
Please check the fiddle also.
I hope this helps.
Thanks.:)