delete kvp object code example
Example: delete kvp object
// remove key-value pair from object
let person = {
name: 'Bob',
age: 34
};
delete person['age'];
console.log(person); // { name: 'Bob' }
// remove key-value pair from object
let person = {
name: 'Bob',
age: 34
};
delete person['age'];
console.log(person); // { name: 'Bob' }