2018-10-16 21:32:40 +05:30

416 B

title
title
Accessing Object Properties with Bracket Notation

Accessing Object Properties with Bracket Notation

Here's one possible solution:

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["the drink"];    // Change this line