Concepts
Own-field selection
Require own fields for an explicit record contract; inherited properties do not satisfy the contract.
Formal Syntax & Structure
javascript syntaxjavascript
Object.hasOwn(record, key)Working Example
Example Snippetjavascript
(async () => {const x=Object.create({theme:"dark"});x.name="A";console.log(x.theme,Object.hasOwn(x,"theme"),Object.hasOwn(x,"name"));})()