Lesson 5 : Who's in Your Bracket?


#22

what is the proble wth my code:
var james = {
job: "programmer",
married: false
};

// set to the first property name of "james"
var aProperty = "job";
console.log( james[aProperty] );


#24

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

I thought what you did, was what they asked for. But it's this actually.


#25

Yes, i think so, How does it know "job" refers to a property from the object?


#26

A post was split to a new topic: Start/Stop timer with alarm


#28