5 Who's in Your Bracket?

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>

<In what way does your code behave incorrectly? Include ALL error messages.>

``` This is my code

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”
console.log(james.job);
// using the variable “aProperty”
console.log(james[aProperty]);

All it returns to me is "
Oops, try again. It looks like james’ job was not logged to the console"
Please help.

<do not remove the three backticks above>
1 Like

@masha.tsuria1gmail.c

You should log james’ job with the variable aProperty. Do not log it directly using james.job

Remove this line

1 Like

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

2 Likes

i used ur code but it gives same error "
Oops, try again.
It looks like james’ job was not logged to the console.
"

1 Like

Thank’s everyone but i actually found out what was my problem… But thanks anyway!!!

1 Like

so what was the problem , I’m kind of little lost

1 Like

Well I solved like 2 days ago so I don’t really remember…

1 Like

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

this code is correct
You should reload your page and try again with the same code

5 Likes

thank you for the reload browser tip, saved me a lot of time.

4 Likes

That was so ridiculously stupid. “Reload the page” actually worked. Thanks for that - I don’t know how many different ways I tried before realizing reloading was the problem. That’s the problem when you’re relatively new - you don’t know if the problem is your code or codecademy…

1 Like

It was just a bug. This happened to me too!
:sweat_smile::wink:

cant’t believe i had to reload my page for it to work LOLLOL

I’m so mad right now. I sat there for an hour looking for a typo, rewriting every line. I just figured I had messed up somewhere. Then I check this and I see “reload the page” and of course that worked.

An hour of my life that I will never get back. Thanks, codeacademy.

wtf…thanks man i reload the page and it works.

freaking bug! … was so annoying

Here was my problem

james[aProperty]);

was logging - “programming”

i changed it to

console.log(james[aProperty]);

and it finally logs - programming…

Correct me if I’m wrong but calling james[aProperty] pulls the full string as written and c.logging it takes the information from the string and posts it… Right?

Thanks it worked …