19 lines
518 B
Markdown
19 lines
518 B
Markdown
|
---
|
||
|
title: Accessing Object Properties with Bracket Notation
|
||
|
localeTitle: الوصول إلى خصائص كائن مع تدرج قوس
|
||
|
---
|
||
|
## الوصول إلى خصائص كائن مع تدرج قوس
|
||
|
|
||
|
فيما يلي حل واحد ممكن:
|
||
|
|
||
|
`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
|
||
|
`
|