21 lines
520 B
Markdown
21 lines
520 B
Markdown
|
---
|
||
|
title: Accessing Object Properties with Bracket Notation
|
||
|
localeTitle: Acceso a las propiedades del objeto con notación de corchete
|
||
|
---
|
||
|
## Acceso a las propiedades del objeto con notación de corchete
|
||
|
|
||
|
Aquí hay una posible solución:
|
||
|
|
||
|
```js
|
||
|
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
|
||
|
|
||
|
```
|