<commit_before>---
id: 56bbb991ad1ed5201cd392d3
title: Delete Properties from a JavaScript Object
challengeType: 1
isHidden: false
videoUrl: 'https://scrimba.com/c/cDqKdTv'
forumTopicId: 17560
---

## Description
<section id='description'>
We can also delete properties from objects like this:
<code>delete ourDog.bark;</code>

Example:

```js
var ourDog = {
  "name": "Camper",
  "legs": 4,
  "tails": 1,
  "friends": ["everything!"],
  "bark": "bow-wow"
};

delete ourDog.bark;
```

After the last line shown above, <code>ourDog</code> looks like:

```js
{
  "name": "Camper",
  "legs": 4,
  "tails": 1,
  "friends": ["everything!"]
}
*/
```

</section>

## Instructions
<section id='instructions'>
Delete the <code>"tails"</code> property from <code>myDog</code>. You may use either dot or bracket notation.
</section>

## Tests
<section id='tests'>

```yml
tests:
  - text: You should delete the property <code>"tails"</code> from <code>myDog</code>.
    testString: assert(typeof myDog === "object" && myDog.tails === undefined);
  - text: You should not modify the <code>myDog</code> setup.
    testString: 'assert(code.match(/"tails": 1/g).length > 0);'

```

</section>

## Challenge Seed
<section id='challengeSeed'>

<div id='js-seed'>

```js<commit_msg>fix(curriculum) remove unnecessary `*/` from description (#38969)<commit_after>---
id: 56bbb991ad1ed5201cd392d3
title: Delete Properties from a JavaScript Object
challengeType: 1
isHidden: false
videoUrl: 'https://scrimba.com/c/cDqKdTv'
forumTopicId: 17560
---

## Description
<section id='description'>
We can also delete properties from objects like this:
<code>delete ourDog.bark;</code>

Example:

```js
var ourDog = {
  "name": "Camper",
  "legs": 4,
  "tails": 1,
  "friends": ["everything!"],
  "bark": "bow-wow"
};

delete ourDog.bark;
```

After the last line shown above, <code>ourDog</code> looks like:

```js
{
  "name": "Camper",
  "legs": 4,
  "tails": 1,
  "friends": ["everything!"]
}
```

</section>

## Instructions
<section id='instructions'>
Delete the <code>"tails"</code> property from <code>myDog</code>. You may use either dot or bracket notation.
</section>

## Tests
<section id='tests'>

```yml
tests:
  - text: You should delete the property <code>"tails"</code> from <code>myDog</code>.
    testString: assert(typeof myDog === "object" && myDog.tails === undefined);
  - text: You should not modify the <code>myDog</code> setup.
    testString: 'assert(code.match(/"tails": 1/g).length > 0);'

```

</section>

## Challenge Seed
<section id='challengeSeed'>

<div id='js-seed'>

```js
{'fraction_non_alphanumeric': 0.18354675979821497, 'fraction_numerical': 0.02211874272409779, 'mean_word_length': 4.62882096069869, 'pattern_counts': {'":': 20, '<': 47, '<?xml version=': 0, '>': 49, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2685317', 'n_tokens_mistral': 1018, 'n_tokens_neox': 903, 'n_words': 254}