36 lines
684 B
Markdown
Raw Normal View History

2018-10-12 15:37:13 -04:00
---
title: Delete Properties from a JavaScript Object
---
## Delete Properties from a JavaScript Object
### HINT:1
* change the properties of myDog by using dot notation
# SPOILER WARNING: SOLUTION AHEAD
```javascript
var ourDog = {
"name": "Camper",
"legs": 4,
"tails": 1,
"friends": ["everything!"],
"bark": "bow-wow"
};
delete ourDog.bark;
// Setup
var myDog = {
"name": "Happy Coder",
"legs": 4,
"tails": 1,
"friends": ["freeCodeCamp Campers"],
"bark": "woof"
};
// Only change code below this line.
delete myDog.tails;
```
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->