Who's in your bracket - can't figure out why this is wrong


#1

I keep getting an error message stating that james's job isn't printing in the console, but I can't figure out why. Any help would be much appreciated! My code is below.


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

Ok, I tried deleting and retyping the last line again and it went through. Still not sure what the issue was before but at least it's working now.


#3

I am having exactly the same issue here. Retyping is not solving it :frowning:


#4

I also have the same problem.


#5

had the same problem, resolved it by reloading the page


#6

yeah I have resolved plenty of false flag errors on previous lessons by reloading the page. but it's not working for this one.


#7

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