JS: Reflect (namespace)

By Xah Lee. Date: . Last updated: .

(new in ECMAScript 2015)

What is the Keyword “Reflect”

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

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

Type

Type of Reflect is Object .

console.assert(typeof Reflect === "object");

Parent

Parent of Reflect is Object.prototype.

console.assert(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