JS: String Operations
String length
"abc".length === 3
Note: no parenthesis after βlengthβ.
Substring
"01234".slice(1,3) === "12"
Index starts at 0.
Join String
Use the plus sign +
to join strings.
("aa" + "bb") === "aabb"
String Methods
JavaScript, String
- JS: String Overview
- JS: Quote String
- JS: Template String
- JS: String Escape Sequence
- JS: Unicode Escape Sequence
- JS: String Operations
- JS: Iterate String
- JS: String Code Unit
- JS: Count Chars in String π
- JS: Tagged Template String
- JS: Regex Functions
- JS: Convert String, Number
- JS: String Object
- JS: String Constructor
- JS: String.prototype