<html>
<body>
<h2>JavaScript switch</h2>
<p id="demo"></p>
<script>
let x = "0";
switch (x) {
case 0:
text = "Off";
break;
case 1:
text = "On";
break;
default:
text = "No value found";
}
document.getElementById("demo").innerHTML = text;
</script>
</body>
</html>