5. Who's in your bracket?


#1

Is there a problem here or is it a system error that other people have been having? Thanks

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

// set to the first property name of "james"
var aProperty = "job";
james[aProperty];
// print the value of the first property of "james"
// using the variable "aProperty"
console.log(james[aProperty]);


#2

This line is doing nothing and safe to remove. Run again and see what happens.


#3

I took that line out but I'm still just getting 'oops, looks like James' job was not logged'.


#4

Ah sorry, actually it works. Thanks!


#5

Sorry, my mistake, it's not working


#6

Sorry, you've got me confused, now. Are we talking James.job or james.job?


#7

I removed the line james[aProperty]; as you suggested, but still nothing. I'm left with this:

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


#8

That all looks correct. I'm as befuddled as you. Common among us oldfolks, but still weird.


#9

Ah! So what do I do now? I can't continue the course


#10

did you try after refreshing your browser ?


#11

we're having the same issue here. my code is the same as yours and I'm also having the "looks like it wasnt logged" error message... any luck? were you able to fix it?


#12

Refreshed my browser and it worked. To think I spent 15 minutes just shaking my head thinking I must have been missing something. Frustrating bug..


#13