исследование стуктуры

by Maxim_Wolf

JavaScript

const someValue = {
  title: 'Cuella',
  release: new Date(2021,05,03),
  empty: undefined,
}

console.log('all keys', Object.keys(someValue));

console.log('typeof key release', typeof someValue.release);
console.log('instance of Date', someValue.release instanceof Date)

console.log('missing value', typeof someValue.empty);
console.log('missing key', Object.hasOwn(someValue, 'missing'));