None of the string methods modify
this – they always return fresh strings.
charAt(pos: number): stringES1
Returns the character at index
str[i]is equivalent to
str.charAt(i)and more concise (caveat: may not work on old engines).