Today's new knowledge

Source: Internet
Author: User

<! Doctype HTML>
<HTML lang = "en">
<Head>
<Meta charset = "UTF-8">
<Title> hehe </title>
<! -- <SCRIPT type = "text/JavaScript"> -->
VaR car = new array;
<! -- Car [0] = "Fate zero"; -->
<! -- Car [1] = "Tokyo ghou"; -->
<! -- Car [2] = "Three fifty-six"; -->
<! -- Car [3] = ""; -->

<! -- // Alert (typeof (CAR); -->
<! -- // Alert (CAR); -->
<! -- // Alert (car. indexof ("Three fifty-six"); -->
<! -- // Alert (car. Length); -->
<! -- </SCRIPT> -->
<! -- <SCRIPT type = "text/JavaScript"> -->
<! -- Var car = new array; -->
<! -- Var I, j; -->
<! -- For (I = 1; I <= 10; I ++) {-->
<! -- Car [I] = I; -->
<! -- Console. Log ("I like your day" + car [I] + "day"); -->
<! --} -->
<! -- Alert (I); -->
<! -- // Alert (typeof (CAR); -->
<! -- // Alert (CAR); -->
<! -- // Alert (car. indexof ("Three fifty-six"); -->
<! -- // Alert (car. Length); -->
<! -- </SCRIPT> -->

<! -- <SCRIPT type = "text/JavaScript"> -->
<! -- // Declare an array -->
<! -- Var xxx = new array (); -->
<! -- Var I; -->
<! -- For (I = 1; I <= 10; I ++) {-->
<! -- // Cyclically assign values to the array -->
<! -- XXX [I-1] = I; -->
<! -- // Output array value in a loop -->

<! --} -->
<! -- // Console. Log ("I LOL" + XXX [I-1] + "days"); -->
<! -- For (I = 1; I <XXX. length; I ++) {-->
<! -- Alert () -->
<! --} -->

<! -- </SCRIPT> -->

<SCRIPT type = "text/JavaScript">
VaR A = ["AA", "BB", "cc"];
VaR B = ["AA", "BB", "cc"];
VaR c = ["", ""];
// Concatenate an array
C = A. Concat (B, c );
// Locate the position of a specified string in the array
VaR d = C. indexof ("HD image ");
// Convert the array into a string
VaR C2 = ["Good Guys", "Good Guys"];
VaR E = c2.join ();
// Delete the last array element
// Var F = C. Pop ();
// Delete the first array element
// Var G = C. Shift ();
// Specify the deletion. First: the start position of the deletion, Second: the number of deletions (start position), followed by the added content
// Var H = C. splice (2, 3, "hehe", "Haha ");
// Add data at the very beginning
// Var J = C. unshift ("Guanxi ");

VaR HH = C. splice (4,0, "hehe", "Haha ");

 


Console. Log (HH );
Console. Log (C );
// Console. Log ();
// Console. Log (B );
// Console. Log (d );

</SCRIPT>

</Head>
<Body>

</Body>
</Html>

Today's new knowledge

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.