Why isn't it printing to the console (can I see your references


#1

hi guys! I wanted to know why my code is not printing to the console:

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

when I run this, it says I passed the exercise, but nothing is happening


#2

Codecademy environment is quite buggy and laggy. Please try to execute your code in the different environment, for example -> https://repl.it/DNdK.

Output of your code is:

Hi, I work as a programmer
Hi, I work as a super programmer

#3

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