jskatas.org Continuously Learn JavaScript. Your Way.

Reflect: Basics

Donate to NGO Julenka. Support Ukranians in need. Julenka is an NGO which my brother founded in 2011 to support Ukranian families and kids in need.

Reflect is special, it is different to e.g. Object

  • it`s of type object
  • it can not be instantiated (new Reflect())
  • has no call method (as opposed to e.g. Object)

some Reflect usages

  • Reflect.construct() is like new ClassName
  • Reflect.get() returns a property`s value
  • Reflect.has() is like in just as a function