Fun with functions


#1

`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();`

I have read other posts here and they say they got this part right with the code like this. But i get the following mesage: "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."
I cant see what i am doing wrong compared to others.

Thanks in advance!
Rugmuk


#2

Is "Hello!" printed? Are there console errors?


#3

I just logged back in and submitted the code to double check the error message and to verify it did not print "Hello!". And for some reason it went through without any problems now.

This is odd, but atleast i progressed through the course. Just wish i knew what happened.