JavaScript: String Object

By Xah Lee. Date: . Last updated: .

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

console.log( window.String === String ); // true

Type

Type of String is a function.

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

Parent

Parent of String is Function.prototype. [see Prototype and Inheritance]

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

Purpose

Purpose of String is:

[see Primitive Value]

String Constructor

String Constructor

Properties

JavaScript String

JS in Depth
XAH  BUY NOW

JS in Depth

JS Obj Ref

DOM


JS Obj Ref

String

prototype