Wrong code?


#1

Syntax error : unexepted token

var BMW = new {
    cout = "Trop cher";
    vitesse = 220;
    pays = 'Allemagne'
};

Thank you ! :stuck_out_tongue:


#2

You need a comma , instead of semicolons ;


#3

Et aussi la notation littérale ne nécessite pas le nouveau mot-clé,

devrait ĂȘtre juste

var BMW = {


#4

Thanks ! Merci Ă  toi :wink:

But now , the SyntaxError shows me :

Invalid shorthand property initializer

var BMW ={
    cout = "Trop cher",
    vitesse = 220,
    pays = 'Allemagne'
};

#5

Vous avez pas suivi les instructions @kyleaw changer les signes Ă©gal Ă  deux points,

to,

cout:"Trop cher",
vitesse:220,
pays:'Allemagne'

#6

Ohh thank you !
I'm been stupid :smiley:


#7

I have no idea what you said. Additionally, I had no idea you spoke French. You're 329% percent cooler now. :slight_smile:


#8

Lol haha its one of the additional courses we have in my school :laughing:


#9

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