Code not working


can anybody suggest why this code isn't working. It is showing an error: james' job was not logged to the console.

var james = {
job: "programmer",
married: false

// set to the first property name of "james"
var aProperty = "job";

// print the value of the first property of "james"
// using the variable "aProperty"
console.log( james[aProperty] );


I'm not sure why it's not working. Have you tried refreshing the page?

Your code is trying to output james['job'], which is valid way to access object properties (but is more common). I believe it is codecademy bug and resetting code or refreshing page should help.


Yes indeed it was a bug. It worked after I tried a few hours later. Anyways thankx for looking into it.


Having the exact same issue and it worked after refreshing the page