2/30 - What am I missing?


#1

It's logging "Hello" but giving an error saying its not logging it?
It's logging "Hello" but giving an error saying its not logging it?

function Person(job, married) {
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();


#2

Hi read the instruction carefully, the instruction told you to print Hello!

with !


#3

thanks i did not read complete the example


#4

function Person(job, married) {
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

Put semicolon( ; ) after "console.log("Hello!")" and after closing curly bracket of function };