hasOwnProperty: To check if a specific key or property exist in an object

PHOTO EMBED

Fri Sep 16 2022 14:09:28 GMT+0000 (Coordinated Universal Time)

Saved by @sreejithbs

console.log(copyPerson.hasOwnProperty('name'))
console.log(copyPerson.hasOwnProperty('score'))
content_copyCOPY

https://github.com/Asabeneh/30-Days-Of-JavaScript/blob/master/08_Day_Objects/08_day_objects.md