JS: Reflect (namespace)

By Xah Lee. Date: . Last updated: .

(new in JS: ECMAScript 2015)

What is the Keyword “Reflect”

Reflect is the value of the property key "Reflect" of the Global Object .

console.log(globalThis["Reflect"] === Reflect);

Type

Type of Reflect is Object .

typeof Reflect === "object"

Parent

Parent of Reflect is Object.prototype.

Reflect.getPrototypeOf(Reflect) === Object.prototype

Purpose

The Reflect object is used as namespace for functions related to JavaScript the language.

Reflect's methods typically:

Properties