JS Built-ins
Reflectsetbeginner

Reflect.set β€” typeof

πŸ“– Usage Example
const obj = {}
Reflect.set(obj, 'name', 'Alice')
console.log(obj.name) // β†’ 'Alice'
// Equivalent to: obj['name'] = 'Alice'

Reflect.set() assigns a value to a property on an object, returning true on success.

typeof Reflect.set

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

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

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