Where I am wrong?


#1

I know it in french but just dont care about the french


#2

on the third line, the "age is not defined. try using a variable by placing "var" in the beginning of line three


#3

Ok ty I will try that


#4

also, don't put quotation marks on the variable "age." hope my debugging helps, tell me if it does


#5

It tell me that I dont put quotation mark


#6

Because now I dont know what to do


#7

else does not take a conditional expression.

if ( age < 13) {
    // something
} else {
    // otherwise
}

#8

I dont understand what you mean


#9

Please post your code (not a picture).

S'il vous plaît envoyer votre code (pas une image).


#10

// Vérifiez que l'utilisateur est prêt à jouer !
confirm("je comprends")
var age = prompt("Quel est votre âge ?");
if( age < 13 )
{
console.log("vous pouvez jouer mais nous ne somme en aucun cas responsable");
}
else
{
console.log("C'est partie");
}
{
console.log("Vous êtes à un concert de Justin Bieber, et vous entendez la chanson 'Lace my shoes off, start racing!");
}


#11

Are you still getting an error? The code above looks correct (though we need a link to the exercise to be sure).


#12

https://www.codecademy.com/fr/courses/javascript-beginner-fr-FR-ol8vw/0/3?curriculum_id=5355c2b7516bcbd912000008#


#13

The lesson checker is not expecting code in a block:

console.log("Vous êtes à un concert de Justin Bieber, et vous entendez la chanson 'Lace my shoes off, start racing!'");

#14

And what am I supossed to do to fix that ?


#15

Line 2: you miss a ";".
Line 4 & 8: please unquote the "age" variable, so it look lime this if (age > 13)
Line8: You may want to write else if (age < 13)
Line12: You wrote a just a block. Nothing before { ... }.
You miss the case if the age = 13. I can't understan the flow of your program, but I guuess that's what you want to write.
If I'm correct you should write something like this:
Line 4: if (age > 13)
Line8: else if (age < 13)
Line12: else


#16

Well I dont understand because it dont work anymore :cry:


#17

It in the unit 1 part 2 number 3 if you do it can you just pls write the answer ? :slight_smile:


#18

I think this might work.

// Vérifiez que l'utilisateur est prêt à jouer !
confirm("je comprends");
var age = prompt("Quel est votre âge ?");
if( age < 13 ) {
    console.log("vous pouvez jouer mais nous ne somme en aucun cas responsable");
}else {
    console.log("C'est partie");
}

    console.log("Vous êtes à un concert de Justin Bieber, et vous entendez la chanson 'Lace my shoes off, start racing!");