JavaScript Array Method description

Source: Internet
Author: User

The array methods of JavaScript are:

Http://www.w3school.com.cn/jsref/jsref_obj_array.asp

Where:concat, join, and slice methods do not modify the original array .

Note: The sort method should be used with a comparison rule .

Example code:

<!DOCTYPE HTML><HTMLLang= "zh">    <Head>        <MetaCharSet= "UTF-8" />        <title>The sort method of the array</title>    </Head>    <Body>        <!--Note that the SRC path should be -        <Scriptsrc= "Js/jquery-1.12.4.min.js"type= "Text/javascript"CharSet= "Utf-8"></Script>        <Scripttype= "Text/javascript">            vararr= [1, 2, Ten,  -, 5]; varArr_n=Arr.sort (function(A, b) {returna>=b; }) Console.log (arr_n)</Script>    </Body></HTML>

JavaScript Array Method description

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.