I get no output but complete the lesson. Is my code wrong? HELP!


#1


No error messages
I am allowed to pass on to the next lesson but nothing is logged to the console. Why is that? What is wrong with my code? Or is it a bug?


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

//The problem is I am allowed to pass on to the next lesson, but nothing is logged to the console. What is weong with my code? Or is it a bug? Please help.


#2

If this situation happens you can move to a more stable environment to test your code. Take a look -> https://repl.it/ClDO/0. It works like a charm. Everything is ok with your code :slight_smile:


#3

Thank you!
-Gloryous


#4

You're very welcome :slight_smile:


#5

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