Please what is wrong with this codes: Accessing Object Properties with Bracket Notation

Tell us what’s happening:

Your code so far

// Setup
var testObj = {
  "an entree": "hamburger",
  "my side": "veggies",
  "the drink": "water"

// Only change code below this line

var entreeValue = testObj["an entree"];   // Change this line
var drinkValue = testObj["water"];    // Change this line

Your browser information:

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

Link to the challenge:

Is ‘water’ a property of testObj?
var drinkValue = testObj["water"];

Read the values of the properties "an entree" and "the drink" of testObj

"the drink": "water"
1 Like

I had figure it out, thanks a lot.

i made the same mistake by writingtestObj['water']it should be ['the drink']