0

What is the output of rhis code?

I have seen this code: var e = 3; switch(c) { case 1: alert("JS"); break; case 2: alert("CSS"); break; case 3: alert("HTML"); break; }

26th Sep 2020, 8:03 PM
Koussay Hajlaoui
Koussay Hajlaoui - avatar
4 Answers
+ 4
You have not defined 'c' in switch. If that was 'e' then it will print HTML in the alert box.
26th Sep 2020, 8:08 PM
Avinesh
Avinesh - avatar
+ 2
Pls revise this topic, https://www.sololearn.com/learn/JavaScript/1139/ Its alert("HTML"); *after correction of variable copy paste code into playground and see answer....
26th Sep 2020, 8:09 PM
Jayakrishna 🇮🇳
0
Please answer with a web code
26th Sep 2020, 8:03 PM
Koussay Hajlaoui
Koussay Hajlaoui - avatar
0
Thank you Avinesh
26th Sep 2020, 8:09 PM
Koussay Hajlaoui
Koussay Hajlaoui - avatar