+ 1
This code is an error???
var x = ""; // i forgot what i delete here 👆👆👆 switch(x) { case "tell me about you": document.write("ive been made by jingga sona"); break; case "Who are you": document.write("im a bot"); break; } why?
10 ответов
+ 5
var x = "Who are you";
switch(x)
{
case "tell me about you":
document.write("ive been made by jingga sona");
break;
case "Who are you":
document.write("im a bot");
break;
}
// variable x didn't declare in u r code.
+ 5
Jingga Sona sorry, but x is without any string value, and in yours cade have not default case.
+ 3
It outputs an error because x is not defined.
Here's a working code
https://code.sololearn.com/WewZvKr2XZp1/?ref=app
+ 2
Your code will produce errors simply because the clearInput() and text() functions are not defined.
+ 1
Jonathan Pizarra i alredy wrote var x = bla nla bla
+ 1
Then post the code here so we can see what's the error
+ 1
Lakhvir Singh i already wrote the X... check out my code
0
i accident delete some text and i save it...😅😅😅
Updating...
Jonathan Pizarra
0
Jonathan Pizarra
Thanks for the Informations!!!
Lakhvir Singh