JS Built-ins
Reflecthasbeginner

Reflect.has β€” typeof

πŸ“– Usage Example
const obj = { a: 1 }
console.log(Reflect.has(obj, 'a'))  // β†’ true
console.log(Reflect.has(obj, 'b'))  // β†’ false
// Equivalent to: 'a' in obj

Reflect.has() checks whether an object has a property, equivalent to the in operator.

typeof Reflect.has

Reflect.has is a static method, so typeof Reflect.has returns 'function'.

Challenge: Verify that typeof Reflect.has returns 'function'.

πŸ’‘ Hints (1)
  • β€’ All `Reflect` methods are functions.