Skip to content

Instantly share code, notes, and snippets.

View xuechunL's full-sized avatar
🤞
Wish me luck.

Rayna xuechunL

🤞
Wish me luck.
  • 10:33 (UTC +01:00)
View GitHub Profile
@xuechunL
xuechunL / cloudSettings
Last active February 12, 2020 02:31
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-02-12T02:30:43.197Z","extensionVersion":"v3.4.3"}

Strings

String.prototype.*

None of the string methods modify this – they always return fresh strings.

  • charAt(pos: number): string ES1

    Returns the character at index pos, as a string (JavaScript does not have a datatype for characters). str[i] is equivalent to str.charAt(i) and more concise (caveat: may not work on old engines).