String

An object representing a series of characters in a string. String is a core object.

Created by

The String constructor:

new String(string);

Parameters

string

Any string.

Description

The String object is a built-in JavaScript object. You an treat any JavaScript string as a String object.

A string can be represented as a literal enclosed by single or double quotation marks; for example, "Hyperion" or 'Hyperion'.

Examples