JS: String (class)

By Xah Lee. Date: . Last updated: .

What is the Keyword “String”

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

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

Type

Type of String is a function.

console.assert(typeof String === "function");

Parent

Parent of String is Function.prototype.

console.assert(Reflect.getPrototypeOf(String) === Function.prototype);

Purpose

Purpose of String is:

〔see Primitive Value

String Constructor

Properties

JavaScript. String