<!doctype html>
<head>
<title>JavaScript Switch Case Example</title>
</head>
<body>
<h3>Switch Case Example</h3>
<script>
let a = 2;
switch (a)
{
case 1:
alert('case 1 has been executed');
case 2:
alert("case 2 has been executed");
case 3:
alert("case 3 has been executed");
case 4:
alert("case 4 has been executed");
default:
alert("default case executed");
}
</script>
</body>
</html>