This forum is now read-only. Please use our new forums! Go to forums
I'm getting "Error: Unspecified error" and I don't know why? 4.6
Here is my code (it is an expansion to the hint): var user = prompt(“Name?”); switch(user) { case ‘Buster’: console.log(“Hey, brother!”); break; case ‘GOB’: console.log(“I’ve made a huge mistake.”); break; case ‘Steve’: console.log(“Steve Holt!”); break; case ‘Lucille’: console.log(“I don’t understand the question, and I won’t respond to it.”); break; case ‘Maeby’: console.log(“Ha! Marry me!”); break; case ‘Lindsey’: console.log(“I need a favor.”); break; case ‘Michael’: console.log(“I don’t know what I expected.”); break; case ‘George Sr.’: console.log(“There’s always money in the banana stand!!! NO TOUCHING!!!”); break; case ‘Ann’: console.log(“Her?”); break; default: console.log(“Oh, COME ON!”); }
yes I’ve tried shortening it to a few cases, but I keep getting the same error regardless of how many. I also tried adding a break after the default: didn’t work. Also, all the necessary indents are in my code, they just don’t show up here because of formatting. Any help will be greatly appreciated, thanks!
Answer 559b7aef76b8fe71350000ad
I ran and went through your code and there is nothing wrong with it. It ran perfect.
Popular free courses
- Free Course
Learn SQL
In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.Beginner friendly,4 LessonsLanguage Fluency - Free Course
Learn JavaScript
Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.Beginner friendly,11 LessonsLanguage Fluency - Free Course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner friendly,6 LessonsLanguage Fluency
2 comments
I’m having the exact same issue, I can’t work out why it’s doing this.
just refreshed the page… the error magically disappeared