2. Fun with Functions


#1

need help!!!!!!!!!!!!!!!
can somebody tell me the error..

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

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


#2

Hi here

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

First inside your function Person() you should only have two argument job and maried just remove the speak inside it

2
// add a "speak" method to Person!
this.speak = speak;
Its should be like that

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

And this part

var user = new Person("Codecademy Student",false,"Hello!");

You should let It as you found it! So remove the "Hello!" inside it.


#3

Please note typo - it's function not fucntion

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