วิธีตรวจสอบว่าสิ่งมีกุญแจจาวาสคริปต์
myObj.hasOwnProperty('key') // it checks object for particular key and not on prototype
โปรดตรวจสอบว่ามีกุญแจอยู่ในการวัตถุจาวาสคริปต์
"key" in obj // true, regardless of the actual value
typescript ตรวจสอบว่าสิ่งมีกุญแจ
if ('key' in myObj)
จาวาสคริปต์ถ้าสิ่งมีกุญแจ
if('key' in object)
ดูสิ่งมีกุญแจจาวาสคริปต์
Object.prototype.hasOwnProperty()