Part 4 of code your own adventure lesson


#1

k. So I entered code for part 4 of this lesson and seems ok until testing I noticed code works for three of the four aspects and can't seem to identify where it is incorrect...Anyone able to notice where I have made an error with the 'No' response??

var user = prompt("Answering Yes / No / Maybe.  Have your got an aim?").toUpperCase();

switch(user){ 
    case 'YES':
        console.log("Good to know you are not one of those people who are often found wandering aimlessly through life");
        break;
    case 'N0':
        console.log
        ("You are amongst a number of people who tend to wander aimlessly through life - now ask yourself...is that a good or a bad thing?");
        break;    
    case 'MAYBE':
        console.log(user + "?  What sort of response is that?  Don't make me come over there and shake you!!! - Now which is it Yes or No?");
        break;
    default:
        console.log(user + "?  Oi! Nice but Dim shud've named U Tim!  Its not rocket science...let me ask you again...Answering WITH a response... Yes / No / Maybe. (Choose ONE of those responses!)  Have your got an aim?");
     
    };

// e by 'eck! this user remembers to put three back ticks ` b4 and after his code when pasting to the forum

Output:

case 'YES':
Good to know you are not one of those people who are often found wandering aimlessly through life

case 'N0':
UHOH! wot u dun now!?!
does not work for some reason?

case 'MAYBE':
MAYBE? What sort of response is that? Don't make me come over there and shake you!!! - Now which is it Yes or No?

default:
DUNNO? Oi! Nice but Dim shud've named U Tim! Its not rocket science...let me ask you again...Answering WITH a response... Yes / No / Maybe. (Choose ONE of those responses!) Have your got an aim?

Not sure why its not working for the No response. Tried deleting and retyping that line of code but it still jumps to default as a reply to the command window. Any suggestions?


#2

You put N followed by a zero, instead of the letter O.


#3

N0000000000000000000000000! haha
thanks jibblyj well spotted I did not see that at all


#4

Haha, N0 problem!