Skip to content

String

length number

name string

prototype object

fromCharCode(codeUnits) function

Return a string created from the specified sequence of UTF-16 code units. Each argument is treated as a code unit in the range [0, 65535].

codeUnits: A series of numbers representing UTF-16 code units.

Returns: A string constructed by mapping each code unit to a character.

fromCodePoint(codePoints) function

Return a string created from the specified sequence of code points, including those above U+FFFF (which will become surrogate pairs). Throws a RangeError for invalid code points.

codePoints: A series of numbers representing Unicode code points.

Returns: A string constructed from the given code points.

raw(template, substitutions) function

A tag function of template literals that returns a raw where escape sequences (e.g., '\n', '\u00A9') are not processed. Commonly used to retrieve the unprocessed text of a template.

template: A template literal, or an object with a 'raw' property.

substitutions: Additional values to substitute (if any).

Returns: The combined raw string from the template.