Array and String methods

Source: Internet
Author: User
Tags string methods

Array

Method Description
Concat () Joins two or more arrays and returns the result.
Join () Put all the elements of the array into a string. element is delimited by the specified delimiter.
Pop () Delete and return the last element of the array
Push () 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 () Delete and return the first element of the array
Slice () Returns the selected element from an existing array
Sort () Sorting elements of an array
Splice () Deletes the element and adds a new element to the array.
Tosource () Returns the source code for the object.
ToString () Converts the array to a string and returns the result.
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 an array object

String

String Object method
Method Description
Anchor () Creates an HTML anchor.
Big () Displays the string in a large font.
Blink () Displays the flashing string.
Bold () Use bold to display the string.
CharAt () Returns the character at the specified position.
charCodeAt () Returns the Unicode encoding of the character at the specified position.
Concat () The connection string.
Fixed () Displays the string as a typewriter text.
FontColor () Displays the string using the specified color.
FontSize () Displays the string using the specified dimensions.
fromCharCode () Creates a string from character encoding.
IndexOf () Retrieves a string.
Italics () Use italic to display strings.
LastIndexOf () The string is searched forward from the back.
Link () Displays the string as a link.
Localecompare () Compares two strings in a local-specific order.
Match () Finds a match for one or more regular expressions.
Replace () Replace the substring that matches the regular expression.
Search () Retrieves a value that matches a regular expression.
Slice () Extracts a fragment of a string and returns the extracted part in a new string.
Small () Use a small font size to display the string.
Split () Splits a string into an array of strings.
Strike () Use strikethrough to display strings.
Sub () Displays the string as subscript.
SUBSTR () Extracts a specified number of characters from the starting index number in a string.
SUBSTRING () Extracts the characters between two specified index numbers in a string.
SUP () Displays the string as superscript.
toLocaleLowerCase () Converts the string to lowercase.
toLocaleUpperCase () Converts the string to uppercase.
toLowerCase () Converts the string to lowercase.
toUpperCase () Converts the string to uppercase.
Tosource () Represents the source code for the object.
ToString () Returns a string.
ValueOf () Returns the original value of a string object.

Array and String methods

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.