BUG , JS ObjectsII


#1

Hello , i've a problem about my exercise :slight_smile:

I thik it's correct :

var jules= {
    job: "devloppeur",
    fiance: false
};
    
};

function Personne(job, fiance) {
    this.job = job;
    this.fiance = fiance;
}
var margaux = new Object('étudiante' , true);
// Créez un objet "margaux" en utilisant le constructeur de Personne !

Thank you !


#2

maybe the error you get is a good hint for you :wink:

var jules= {
    job: "devloppeur",
    fiance: false
};
    
}; // why is that here

#3

lets start here:

var jules= {
    job: "devloppeur",
    fiance: false
};
    
}; // what does this } do here?

the second } seems redundant. (see comment in the code above)

make sure to spell developpeur and etudiant correctly, use the ones from the error message, the one in the instructions don't work.

on line 12 you want to create an instance so you want to create a new Personne not a new Object


#4

Thanks , now my problem is :

Oops, please try again. Make sure that you created Margins using the Person constructor and that you gave it 'Student' as the first argument.

var jules= {
    job: "developpeur",
    fiance: false
};
    


function Personne(job, fiance) {
    this.job = job;
    this.fiance = fiance;
}
var margaux = new Personne('étudiant' , true);

#5

use etudiant (without thingie on the e), that should work.


#6

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