4. can i see your referances. it works but still gets errors


#1



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


everything is correct and I believe that the correct things are logged but it still says I'm doing it incorrect


var james = {
    job: "programmer",
    married: false,
    sayJob: function() {
        // complete this method
        console.log("Hi I work as a "+ this.job);
    }
};

// james' first job
james.sayJob();

// change james' job to "super programmer" here
james.job = "super programmer";

// james' second job
james.sayJob();


#2

Get rid of the this.__ .There isn't anything that defines this , and you only need to put the job probperty , which is job
Hope this helps :grin:


#3

this worked in letting me pass the module but I get a ref error saying that job is undefined from that!


#4

I'll have a look
I'll reply as soon as i can


#5

I've found the solution.
Ignore what i said before:

Keep the this.job.

There's a comma missing after
Hi


#6

thank you so much! That makes much more sense!


#7

no problem! This always happens to me!:smile:


#8

thanks to both of you, just got similar problem: typing "Hello" instead of "Hi" and wondering what is incorrect.......


#9

Not helpful. It is incorrect advice.


#10

And may serve as a lesson in these course tracks. Many authors provide text phrases and variable names that they expect us to use. It's how they are able to check our work. When given, (for example)

"Hi, I work as a [job]"

in the instructions, use the exact phrase (placeholder notwithstanding).


#11

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