James Job error


#1

I am not sure what I am doing wrong

Take advantage of the ability to use variables with bracket notation.

In line 7, set aProperty to a string of the first property in james (ie. the job property).

Then print james's job using bracket notation and aProperty.

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"

james[aProperty];
console.log(james[aProperty]);


#2

Hi try to remove the variable

james[aPropriety];

the one outside the console.log()


#3

I had done that originally but I got the following error.

Oops, try again. It looks like james' job was not logged to the console.


#4

so your ocde its like that

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"

// you should remove that one james[aProperty];
console.log(james[aProperty]);

#5


#6

try to refresh the page.


Oops, try again: looks like james'job was not logged to the console
#7

Appreciate the help. That worked