7/14 hellppp!


#1

var answer = prompt("Add your question here!");

switch(answer) {
case '':
console.log();
break;
console.log("Length".length)
}
what is wrong


#2
var answer = prompt("Add your question here!","nothing");

switch(answer) {
 case 'nothing':
    console.log("No question");
    break;
 default:
    console.log("Length".length)
}

#3

 var console = prompt("What's your favourite gaming system?");

switch(console){
  case 'Playstation':
    console.log("That my favourite too!");
    break;
  case 'Nintendo':
    console.log("I like them, they're cool.");
    break;
  case 'Xbox':
    console.log("Not really my thing, but I don't judge.");
    break;
  default:
    console.log("I don't think I've heard of that!");  
}

This should be working just fine.


#4

Nevermind. I figured out what I did wrong.

var system = prompt("What's your favourite gaming system?");

switch(system) {
  case 'Playstation':
    console.log("That my favourite too!");
    break;
  case 'Nintendo':
    console.log("I like them, they're cool.");
    break;
  case 'Xbox':
    console.log("Not really my thing, but I don't judge.");
    break;
  case 'Sega':
    console.log("Those guys are full of it.");
    break;
  case 'Atari':
    console.log("No one cares about them anymore.");
    break;
  default:
    console.log("I don't think I've heard of that!");

#5

Oh yes console seems to be a bad choice for a variable name since it is one of the built-in object from which methods like console.log are frequently used. Just for further readers. Sry missed this post somehow. Also if you have a question it really helps if you post it in an own thread instead of hijacking and reviving dead threads. Just because they had more attention doesn't mean they still have.


#6

no it doesnt you got it wrong