1. concat(str1, str2, ... , strN)
The concat() method joins two or more strings. The concat() method does not change the existing strings. The concat() method returns a new string.
2. endsWith(searchString, length)
Checks whether a string ends with specified string/characters. It only returns true or false. The endsWith() method is case sensitive.
3. includes(searchString, position)
Checks whether a string contains the specified string/characters. It only returns true or false. The includes() method is case sensitive.
4. indexOf(searchValue, fromIndex)
Returns the position of the first found occurrence of a specified value in a string. The indexOf() method returns -1 if the value is not found. The indexOf() method is case sensitive.
5. lastIndexOf(searchValue, fromIndex)
Returns the position of the last found occurrence of a specified value in a string. The indexOf() method returns -1 if the value is not found. The lastIndexOf() method is case sensitive.
6. replace(regexp/substr, newSubstr/replacerFunction)
Searches a string for a specified value, or a regular expression, and returns a new string where the specified values are replaced.
7. slice(beginIndex, endIndex)
Extracts a part of a string and returns a new string.
8. split(separator, limit)
Splits a string into an array of substrings. If (" ") is used as separator, the string is split between words.
9. startsWith(searchString, position)
Checks whether a string begins with specified characters. It only returns true or false. The startsWith() method is case sensitive.
10. toLocaleLowerCase()
Converts a string to lowercase letters, according to the host's locale. The locale is based on the language settings of the browser. The toLocaleLowerCase() returns the same result as toLowerCase(), except for locales that conflict with the regular Unicode case mappings (such as Turkish).
11. toLocaleUpperCase()
Converts a string to uppercase letters, according to the host's locale. The locale is based on the language settings of the browser. The toLocaleUpperrCase() returns the same result as toLowerCase(), except for locales that conflict with the regular Unicode case mappings (such as Turkish).
Top comments (0)