30/30js je ne comprends pas


#1

function bulletinEtudiant() {
var this.note1 = 4;
var this.note2 = 2;
var this.note3 = 1;
this.getGPA = function() {
return (this.note1 + this.note2 + this.note3) / 3;
};
}

var monBulletinEtudiant = new bulletinEtudiant();

for(var x in monBulletinEtudiant) {
if(typeof monBulletinEtudiant[x] !== "function") {
console.log("Mouahaha! " + monBulletinEtudiant[x]);
}
}

console.log("Votre GPA total vaut " + monBulletinEtudiant.getGPA());
var notes = monBulletinEtudiant.getGPA();
console.log (notes);

erreur:Oups, merci de réessayer. There was a problem with your syntax.