Problem with Dot Notation on Object Properties

Tell us what’s happening:
I replicated the example in the code and am receiving an error message. I noticed the variable values above the “do not change” line were in quotes and tried removing those as well. Still receiving the same error. Looked at the example video and sample solution, and they seem to contain the same code that I am using.

  **Your code so far**

// Setup
var testObj = {
hat: "ballcap",
shirt: "jersey",
shoes: "cleats"

// Only change code below this line

var hatValue = testObj.hat;      // Change this line
var shirtValue = testObj.shirt;    // Change this line
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36

Challenge: Accessing Object Properties with Dot Notation

Link to the challenge:

After refreshing the page, it worked successfully.

1 Like

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