5. Who's in your bracket?


#1

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

Hey, this exercise seems super simple so I have no idea what I'm doing wrong. Also, when I submit the code, it does show the correct result ("programmer"), but the website says "Oops, try again. It looks like james' job was not logged to the console." So is it correct or not?


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


#2

Actually you didn't print that.system prints for you.

how to print anything in javascript?


#3

The comments in the code are not mine, it's part of the exercise.


#4

Sorry! i didn't say anything about comments.

now you have to print the value of the first property of "james" .
how to print anything in javascript?

Hint

use console.log()


#5

Oh God. Thanks! I don't know how could I possibly have missed that :smiley:


#6

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