Consider following code:

switch ("a") {
    case "b":
        console.log("b");
        break;
    default:
        console.log("d");
    case "c":
        console.log("c");
}
What will be printed by the code above?
Explanation
The code will run without error. There is no break keyword in the default block and the output will be "d" and "c"

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Cosmo
Sign Up Now
or Subscribe for future quizzes