This forum is now read-only. Please use our new forums! Go to forums

0 points
Submitted by FalscheAussage
almost 9 years

28/33 ??? pls help me :(

i dont get it

Answer 556eb18c76b8fec9eb0002e7

1 vote

Permalink

// 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)

points
Submitted by UnideObject
almost 9 years

Answer 5583ef5276b8fe662d00038f

0 votes

Permalink

use ; at the end of var diff = ageDifference(alice, billy)

By Santosh senior developer at Unihalt

points
Submitted by santosh.developer
almost 9 years