5. Who´s on your brackets


#1



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


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

  • I get this errormessage and I can´t really seem to understand why. For all I know this should work no problem. But since it doesn´t, can some one tell me what´s wrong and show me the right synthax for this exercise?

Thanks in advance.


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

@justsomething,

Maybe...
++++ reset of session *****************
As you are manipulating with objects
under certain circumstances you can shoot your Browser in an
inconsistent state.

Therefor it is of an advantage to know that you have 2 reset facilities:

One is the use of the F5-key which does a refresh Browser

and

Two, select&copy your code
Then use the Reset Code button of the course-window,
then paste your code back in.

Addendum
General Notes:
Always refresh the browser after making corrections:
CTRL f5 ( if on Windows or Linux)
CMD r ( if on a MAC).
CTRL 0 to reset browser zoom


#3

That seems to have solved it. The more you know!

Thanks for your help.