You can delete elements of objects
using the delete
operator.
Let's look at examples. Suppose we
are given such an object:
let obj = {a: 1, b: 2, c: 3};
Let's delete one of the elements of our object:
delete obj.b;
Let's see what we got:
console.log(obj); // shows {a: 1, c: 3}
Tell me what will be output to the console as a result of executing the following code:
let obj = {x: 1, y: 2, z: 3};
delete obj.x;
console.log('x' in obj);