4/30 code passes but nothing is logged to the console -- what am I missing?


#1

I don't know why nothing shows up on the preview window but the code passes/says i'm correct. Please help!

Here is my code:

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

It is working now! I was having trouble with multiple sub categories but they are working now.


#3

can you post the code you did that worked? nothing is printing here either and i have no idea why


#4

I had the same issue. It did not print the console.log but told me I was correct and let me continue. Admin might want to look at this for bugs.


#5

What do u mean multiple sub-categories. I have the exact same problem!

var james = {
job: "programmer",
married: false,
sayJob: function() {
// complete this method
console.log("Hi, I word 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();


#6

First thing I saw was that you have incorrectly typed the message

try:
console.log("Hi, I work as a " + this.job);