5. Who's in your bracket. (Having a problem)


#1


Hi. I don't know whats the problem? It seems to me i did it ok but it keeps showing me:
It looks like james' job wasn't logged to the console.

Here is the 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" 
// using the variable "aProperty"
console.log (james[aProperty]);


#2

The code should look like this

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

var aProperty = "job";

james[aProperty];

console.log(james[aProperty])


#3

Thanks, but it works also as i typed. I just restarted the browser. :wink:


#4

no Problemo.... Glad to help


#5

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