Js array object method, js array object Method

Source: Internet
Author: User

Js array object method, js array object Method

Summary of array methods in js:

1. concat ()

Concatenates two or more arrays and returns an array of results.

2. join ()

Put all elements of the array into a string. Elements are separated by specified delimiters.

3. pop ()

Delete and return the last element of the array

4. push ()

Add one or more elements to the end of the array and return a new length.

5. reverse ()

Reversing the order of elements in an array

6. shift ()

Delete and return the first element of the array

7. slice ()

Returns the selected element from an existing array.

8. sort ()

Sorts elements of an array.

9. splice ()

Delete elements and add new elements to the array

10. unshift ()

Add one or more elements to the beginning of the array and return a new length.

11. valueOf ()

Returns the original value of the array object.

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.