JS Built-ins
Reflectgetbeginner

Reflect.get β€” typeof

πŸ“– Usage Example
const obj = { name: 'Alice', age: 30 }
const name = Reflect.get(obj, 'name')
console.log(name) // β†’ 'Alice'

Reflect.get() retrieves the value of a property on an object, equivalent to obj[key].

typeof Reflect.get

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

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

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