Skip to content

Instantly share code, notes, and snippets.

View 4konung's full-sized avatar
:octocat:

Vadim Konung 4konung

:octocat:
  • Kharkiv
  • 04:53 (UTC +02:00)
View GitHub Profile

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).