common methods of stringscharAt () returns the character at the specified index positioncharCodeAt () returns the Unicode value of the specified index position characterconcat () joins two or more strings, returning the concatenated stringfromCharCode () converts Unicode to a stringindexOf () returns the position of the first occurrence of the specified character in a stringlastIndexOf () returns the position of the last occurrence of the specified character in a stringLocalecompare () compares two strings in a local-specific orderMatch () finds the matching of one or more regular expressionsreplace () replaces a substring that matches a regular expressionSearch () retrieves a value that matches a regular expressionSlice () extracts a fragment of a string and returns the extracted part in a new stringSplit () splits a string into a substring arraysubstr () extracts a specified number of characters from the starting index number in a stringsubstring () extracts the characters between two specified index numbers in a stringtolocalelowercase () converts a string to lowercase based on the host's locale, with only a few languages (such as Turkish) with a local case-specific mappingtolocaleuppercase () converts a string to uppercase based on the host's locale, with only a few languages (such as Turkish) with a local case-specific mappingtoLowerCase () converts a string to lowercasetoString () returns the string object valuetoUpperCase () converts a string to uppercasetrim () Remove string end and end blanksvalueOf () returns the original value of a string objectcommon methods for arraysconcat () joins two or more arrays and returns the result. join () places all elements of an array into a string. element is delimited by the specified delimiter. pop () deletes and returns the last element of the arraypush () adds one or more elements to the end of the array and returns the new length. reverse () reverses the order of the elements in the array. shift () deletes and returns the first element of the arraySlice () returns the selected element from an existing arraysort () sorts the elements of an arraySplice () deletes the element and adds a new element to the array. Tosource () returns the source code of the object. toString () converts the array to a string and returns the result. the elements in the array are separated by commas . tolocalestring () converts the array to a local array and returns the result. Unshift () adds one or more elements to the beginning of the array and returns the new length. valueOf () returns the original value of the array object
Common methods for string and array