Javascript Strings

Get the length of a string. You can get a single character from a string like an array element. Strings are immutable, however. toUpperCase converts a string to all uppercase. toLowerCase converts a string to all lowercase. trim removes whitespace from both ends. trimStart removes whitespace from the start of a string. trimLeft does the same. trimEnd removes it from the end. trimRight does the same. padStart adds characters to the start of a string. padEnd does the same to the end of a string. Returns the UTF-16 code for the character at a given point in the string. Returns the Unicode value for the character at a given point in the string. Convert a UTF-16 code to its corresponding character. The TextEncoder object can convert a string into a UTF-8 array and the TextDecoder object can do the reverse.