2018-10-12 16:35:31 -04:00
|
|
|
---
|
|
|
|
|
title: Accessing Object Properties with Dot Notation
|
|
|
|
|
localeTitle: الوصول إلى خصائص كائن مع ترميز Dot
|
|
|
|
|
---
|
|
|
|
|
## الوصول إلى خصائص كائن مع ترميز Dot
|
|
|
|
|
|
|
|
|
|
فيما يلي حل واحد ممكن:
|
|
|
|
|
|
2019-06-20 14:05:02 -07:00
|
|
|
```js
|
|
|
|
|
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
|
|
|
|
|
```
|