Convert the following lines of code into an if-else statements. var x = 0; switch (x) {
Fantastic news! We've Found the answer you've been seeking!
Question:
Convert the following lines of code into an if-else statements.
var x = "0";
switch (x) {
case 0:
text = "Off";
break;
case 1:
text = "On";
break;
default:
text = "No value found";
}
Related Book For
Posted Date: