JS: String Object

By Xah Lee. Date: . Last updated: .

What is the Keyword “String”

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

window.String === String

Type

Type of String is a function.

// type of String
console.log( typeof String === "function" );

Parent

Parent of String is Function.prototype.

// parent of String
console.log( Reflect.getPrototypeOf ( String ) === Function.prototype );

Purpose

Purpose of String is:

[see Primitive Value]

String Constructor

Properties

JavaScript, String

BUY ΣJS JavaScript in Depth