Why is undefined being logged?



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

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

// set to the first property name of "james"
var aProperty = "programmer";

// print the value of the first property of "james" 
// using the variable "aProperty"

Here's what's logging into my console



To access value we use key.

"programmer" is a value.

you need to save key in aProperty which is job? (It should be string!)


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