Probleme dans code your own adventure etape 4 a 7


#1

J'ai réussi à finir "code your own adventure" mais le problème est que mon code est juste alors que on ne me demande pas mon avis sur les deux dernier if/else voici mon code pouvez vous m'aider
(je ne susi pas bloqué, j'ai réusi à finir je trouve juste etrange qu'on ne me demande pas mon avis avec userAnswer)
// Check if the user is ready to play!
confirm("I understand confirm!");
var age = prompt("What's your age ?");
if(age<13){
console.log("Vous pouvez jouer mais nous ne serons pas responsables en cas de problèmes");
}else{
console.log("Vous pouvez jouer et nous vous souhaitons bonne chance");
}
console.log("You are at a Justin Bieber concert, and you hear this lyric 'Lace my shoes off, start racing.'");
console.log("Suddenly, Bieber stops and says, 'Who wants to race me?'");
var userAnswer=prompt
console.log("Do you want to race Bieber on stage?");
if(userAnswer ="yes"){
console.log("You and Bieber start racing. It's neck and neck! You win by a shoelace!");
}else{
console.log("Oh no! Bieber shakes his head and sings 'I set a pace, so I can race without pacing.'");
}
var feedback = prompt
if(feedback=>8){
console.log("Thank you! We should race at the next concert!");
}else{
console.log("I'll keep practicing coding and racing.");
}

merci de votre aide j'attends vos réponses au plus vite


#2

Translation for those who don't speak French:

I have managed to finish "code your own adventure" but the problem is that my code is just when you do not ask my opinion on the last two if / else. here is my code. Can you help me?
(I did not know blocked, I managed to finish. I find it strange that you do not ask my opinion with userAnswer)
// Check if the user is ready to play!
Confirm ("I understand confirm!");
Var age = prompt ("What's your age?");
If (age <13) {
Console.log ("You can play but we will not be responsible in case of problems");
} Else {
Console.log ("You can play and we wish you good luck");
}
Console.log ("You are at a Justin Bieber concert, and you hear this lyric 'Lace my shoes off, start racing.
Console.log ("Suddenly, Bieber stops and says, 'Who wants to race me?'");
Var userAnswer = prompt
Console.log ("Do you want to race Bieber on stage?");
If (userAnswer = "yes") {
Console.log ("You and Bieber start racing, it's neck and neck! You win by a shoelace!");
} Else {
Console.log ("Oh no! Bieber shakes his head and sings 'I set a pace, so I can race without pacing.'");
}
Var feedback = prompt
If (feedback => 8) {
Console.log ("Thank you!");
} Else {
Console.log ("I'll keep practicing coding and racing.");
}

Thank you for your help. I wait for your answers as soon as possible


#3

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