Oops, try again. Do you have the variable 'aProperty' between brackets?



My code does exactly as it wants me to, but it says, "Oops, try again. Do you have the variable 'aProperty' between brackets?". I don't understand why I would need to put a variable between brackets.

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"


The brackets expected are index block type, as in square brackets. The array index access syntax is



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