3. Adding some story


#1

Adding some story task.

// My code:
if (confirm("Are you ready to play a game?")) {
    var age = parseInt(prompt("What's your age?"));
    
    if (isNaN(age)) {
        alert("Ok! I make desigion for you!");
        age = 12;
    }
    
    if (age < 13) {
        console.log("You're allowed to play, but I don't take any responsibility about your psychological state!");
    } else {
        console.log("Let's make some ACTION!!!");
    }
    
    console.log("You are at a Baphomet concert, and you hear this lyric 'In your eyes I see a message...'");
} else {
    alert("So sad... But bye bye! ^_^");
}

// Main part of task:
console.log("You are at a Baphomet concert, and you hear this lyric 'In your eyes I see a message...'");

Error:

Opened the hints:

Oh God... Why?


#2

You might as well get used to doing what the client or the boss wants. :wink:


#3

console.log("You're allowed to play, but I don't take any responsibility about your psychological state!");

Felt like Nostradamus...

At "The story heats up!" you can say no. At least.
Is it really necessary to follow the instructions word by word?


#4

In some exercises it is, in those, the code checker has been programmed to look for an exact string.


#5

So can I change my code after each checking to something that I'm want?


#6

Without doing some experimenting, I can't say that will work in every case, but I think you will find that you can often do that.


#7

Many thanks for your response! :3


#8

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.