Strings and Regular Expressions

Strings in Javascript

String methods

charAt
An alternative for accessing a specific location in the string
charCodeAt
Returns the numeric Unicode value of the character at a specific location.
concat
Concatenates strings
indexOf
Search within the string for the first occurence of a substring.
lastIndexOf
Similar to indexOf, but finds the last occurence instead.
split
Split a string into an array of strings based on a separator parameter.
substr
Extract a section of a string
substring
Very similar to substr, but slightly different arguments
toLowerCase
Converts to lower case
toUpperCase
Converts to upper case
startsWith
Checks if the string starts with the provided string
endsWith
Checks if the string ends with the provided string
includes
Checks if the string includes with the provided string
repeat
Repeats the string a number of times

Regular Expressions in Javascript

Using regular expressions