JS: String Overview

By Xah Lee. Date: . Last updated: .

What is String

String is a sequence of characters. (technically, it is sequence of String Code Unit )

Quote String

String Escape Sequence

String Operations

String Type

String is one of the JavaScript Value Types

String is a Primitive Value

String is Immutable

String is 16 Bits Unit Sequence

String Index

String Constructor

String value can also be created by using the constructor function String.

[see String Constructor]

String is Iterable

That means, you can use for-of Loop and it will go thru the string by char, not String Code Unit .

you can also use Spread Operator to turn a string into a array of chars.

JavaScript, String

BUY Ξ£JS JavaScript in Depth