Help me out


#1


Oops, try again. It looks like 'Hello!' wasn't logged to the console. Make sure that you properly defined the method and that you didn't change any of the provided code.

Replace this line with your code. 
function Person(job, married, speak) {
this.job = job;
this.married = married;

this.speak = function()
{
console.log("Hello!");
};
}

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


#2

Remove the speak parameter from your Person object,


#3

tried ....not working out


#4

Is your code above indented like this?

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

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

#5

no i have semicolon in the one above last curly bracket...nd i reset the code and typed the previous one i sent ....and its working now....thank you for refrence


#6

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