Fun with Functions


#1


This is my code. What am I doing wrong? I tried to reset the page and it do not work..


https://www.codecademy.com/courses/objects-ii/0/2?curriculum_id=506324b3a7dffd00020bf661

this is error:
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.

function Person(job, married) {
this.job = job;
this.married = married;
this.speak = function () {
console.log("Hello");
};
}

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

`


#2

It looks like ' Hello! ' wasn't logged to the console.

See the difference?


#3

Yes :slight_smile: Thank you for your help!


#4

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