Why this code doestn work?


#1

This code shoud work and its log "programmer", but in bottom of the screnn its say "Oops, try again. Do you have the variable 'aProperty' between brackets?"

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

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

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

#2

You should have this:

aProperty = 'job'

And if I change aProperty to 'married' then false should get printed out - without changing any other part of the code.