freeCodeCamp/guide/english/certifications/javascript-algorithms-and-d.../basic-javascript/accessing-object-properties.../index.md

19 lines
377 B
Markdown
Raw Normal View History

2018-10-12 19:37:13 +00:00
---
title: Accessing Object Properties with Dot Notation
---
## Accessing Object Properties with Dot Notation
Here's one possible solution:
```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
```