javascript remove object key

JavaScript
let person = {
  firstname: 'John',
  lastname: 'Doe'
}

console.log(person.firstname);
// expected output: "John"

delete person.firstname;

console.log(person.firstname);
// expected output: undefineddelete object.keyname;var obj = {a: 5, b: 3};
delete obj["a"];
console.log(obj); // {b: 3}
Source

Also in JavaScript: