JavaScript в ключевом слова

const person = { name: 'Nick', lastName: 'Coolguy', yearBorn: 1998 };

console.log('yearBorn' in person); // expected output: true

delete person.yearBorn;
if ('yearBorn' in person === false) {
  person.yearBorn = 2000;
}

console.log(person.yearBorn); // expected output: "2000"
DCmax1k