28/33 syntax error whats wrong?


#1

// Our person constructor
function Person (name, age) {
this.name = name;
this.age = age;
}

// We can make a function which takes persons as arguments
// This one computes the difference in ages between two people
var ageDifference = function(person1, person2) {
return person1.age - person2.age;
}

var alice = new Person("Alice", 30);
var billy = new Person("Billy", 25);

// get the difference in age between alice and billy using our function
var diff = ageDifference(alice, billy ){
return alice.age - billy.age;
}


#2

Your mistake is here:

You need only to call the function that you are alredy created like this:

var diff = ageDifference(alice, billy );

#3

aha thank you very mutch