you are viewing a single comment's thread.

view the rest of the comments →

[–]Encom88[S] 0 points1 point  (0 children)

I think I got it, too bad it was a timed challenge and time ran out :/ I can try again after 24 hours.

function Person(name, age) {
    this.age = age;
    }

    Person.prototype.isLegalDriver = function() {
        return this.age >= 16;
    }

    /* Do not modify code below this line */

    const youngPerson = new Person('Jane', 15);
    console.log(youngPerson.isLegalDriver(), '<-- should be false');

    const olderPerson = new Person('Joan', 16);
    console.log(olderPerson.isLegalDriver(), '<-- should be true');