Lesson 5 Introduction to Objects II Glitch?


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

As far as i know this is exactly what they ask yet it tells me that it "programmer" wasn't printed onto the console. Is this some sort of glitch?


I found a solution to this problem if other people are having it. Refresh the entire page and it should work i have no idea why it doesn't work before hand which was frustrating lol but that seemed to fix the glitch


No space between the console.log and the opening-parenthesis-(
like your

console.log (james[aProperty]);

should have been



Thank you for this. Worked for me i literally didnt change any code just refreshed the page. Odd..