Fun with functions


#1


function Person(job, married,speak) {
    this.job = job;
    this.married = married;
    // add a "speak" method to Person!
    this.speak = function(speak){
        console.log("Hello!");
    };
}

var user = new Person("Codecademy Student",false);
user.speak();


#2

Your constructor has 3 parameters but you put only 2. Please, post the link to the lesson and describe your problem (or print error message).


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.