1let person = {
2 firstname: 'John',
3 lastname: 'Doe'
4}
5
6console.log(person.firstname);
7// expected output: "John"
8
9delete person.firstname;
10
11console.log(person.firstname);
12// expected output: undefined
1// Example 1
2var key = "Cow";
3delete thisIsObject[key];
4
5// Example 2
6delete thisIsObject["Cow"];
7
8// Example 3
9delete thisIsObject.Cow;
1// Example 1
2var key = "Cow";
3delete thisIsObject[key];
4
5// Example 2
6delete thisIsObject["Cow"];
7
8// Example 3
9delete thisIsObject.Cow;
10