String Methods Flashcards
Returns the character at a specified index (position)
charAt()
Returns the Unicode of the character at a specified index
charCodeAt()
Returns two or more joined strings
concat()
Returns the string’s constructor function
constructor
Returns if a string ends with a specified value
endsWith()
Returns Unicode values as characters
fromCharCode()
Returns if a string contains a specified value
includes()
Returns the index (position) of the first occurrence of a value in a string
indexOf()
Returns the index (position) of the last occurrence of a value in a string
lastIndexOf()
Returns the length of a string
length
Compares two strings in the current locale
localeCompare()
Searches a string for a value, or a regular expression, and returns the matches
match()
Allows you to add properties and methods to an object
prototype
Returns a new string with a number of copies of a string
repeat()
Searches a string for a value, or a regular expression, and returns a string where the values are replaced
replace()