What's wrong with the code?


#1

It keeps telling me that I have an extra '{' somewhere but I don't see anything wrong. Any Ideas?

var olderAge = function(alice, billy){
if (person1.age > person2.age){
return person1.age;
} else if {
return person2.age;
} else {
return 'nothing';
}
};
olderAge(alice, billy);


#2

function(person1, person2){

#3

if (person1.age > person2.age){
    return person1.age;
} else {
    return person2.age;
}

#4

Your else if statement needs to have a condition. else if ("some requirement") {


#5

No else if statement required for this exercise. Return the greater age is all that is asked for.