Problem With Syntax?


#1


Anyone see what I'm doing wrong?


https://www.codecademy.com/courses/objects-ii/5/4?curriculum_id=506324b3a7dffd00020bf661#


SyntaxError: Unexpected token )


function StudentReport() {
    var grade1 = 4;
    var grade2 = 2;
    var grade3 = 1;
    this.getGPA = function() {
        return (grade1 + grade2 + grade3) / 3)
    };
};

var myStudentReport = new StudentReport();

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

console.log("Your overall GPA is " + myStudentReport.getGPA);


#2

this line:

return (grade1 + grade2 + grade3) / 3)

check how many parentheses are present


#3

Got it two minutes after I posted, and you still beat me to it. Thanks!


#5

#6

Posting helps, then you take another good look because you don't want to feel foolish for missing something obvious