5. Who's in Your Bracket?


#1



https://www.codecademy.com/courses/objects-ii/0/5?curriculum_id=506324b3a7dffd00020bf661#


I'm not sure what I'm doing wrong here. I was flying through all my exercises, getting them all right, but this one says I'm wrong. I rechecked my code multiple times.

Step 1) "In line 7, set aProperty to a string of the first property in james (ie. the job property)."
Okay, I did that with

var aProperty = "job";

Step 2) "Then print james's job using bracket notation and aProperty."
Okay, I did that with

console.log(james[aProperty]);

Here is all of my code in a Link for whatever weird reason you have , & below :

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]);
// also tried using just
// james[aProperty];
// by itself with no luck


#2

Hi try to refresh the page... Because your code is right


#3

DOH. facepalm

Thank you Wizmarco. :slight_smile:


#4

thanks man:slight_smile:


#5

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