JS Built-ins
ReflectownKeysbeginner

Reflect.ownKeys - typeof

πŸ“– Usage Example
const obj = { a: 1, b: 2 }
const keys = Reflect.ownKeys(obj)
console.log(keys) // β†’ ['a', 'b']
// Includes string keys, Symbol keys, and non-enumerable keys

Reflect.ownKeys() returns an array of all own property keys (strings and Symbols) of an object.

typeof Reflect.ownKeys returns function.

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