Can I see Your reference? Not printing anything


#1


Why is it not displaying anything (the old or the new job) in the editor? when
I use the console statement and call the function then it should be printing 
the line "Hi..." right?

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


james.sayJob();


james.job = "super programmer";


james.sayJob();


#2

Your code is correct. try to refresh your browser and run code again.


#4

Will try that, Thank you :slight_smile:


#5

Why does this happen? I stopped learning SAAS for the same reason when I would run the code and get no results. Then I would look through the Q & A and find out my code was right all along.


#6

I don't know the reason, but sometimes it happens. Anyway don't stop your learning.


#7

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