2018-10-12 15:37:13 -04:00
|
|
|
---
|
|
|
|
title: Updating Object Properties
|
|
|
|
---
|
2019-07-24 00:59:27 -07:00
|
|
|
|
|
|
|
# Updating Object Properties
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
## Hints
|
|
|
|
|
|
|
|
### Hint 1
|
2018-10-12 15:37:13 -04:00
|
|
|
Use dot ** . ** notation to access the object property.
|
|
|
|
|
|
|
|
|
2019-07-24 00:59:27 -07:00
|
|
|
---
|
|
|
|
## Solutions
|
|
|
|
|
|
|
|
<details><summary>Solution 1 (Click to Show/Hide)</summary>
|
2018-10-12 15:37:13 -04:00
|
|
|
|
|
|
|
```javascript
|
|
|
|
// Setup
|
|
|
|
var myDog = {
|
2019-07-24 00:59:27 -07:00
|
|
|
name: "Coder",
|
|
|
|
legs: 4,
|
|
|
|
tails: 1,
|
|
|
|
friends: ["freeCodeCamp Campers"]
|
2018-10-12 15:37:13 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
// Only change code below this line.
|
|
|
|
|
|
|
|
myDog.name = "Happy Coder"; // Solution
|
|
|
|
```
|
|
|
|
|
2019-07-24 00:59:27 -07:00
|
|
|
</details>
|