javascript-Authoritative Guide reading notes (1)

Source: Internet
Author: User

    <script type= "Text/javascript" >//the relationship of the array to object var obj = {name: "Liu Jianwei", Age:12, height:22};        Console.log (obj["name"]);        var a = {0: "12", 1: "34", 2: "56"};            var a = [12, 34, 56];//array is an object evolved, R then encapsulates some method//Custom Silice Method Array.prototype.slice = function (S, e) {            This            var a = []; var e = typeof E = = "Number"?            e:this.length;//e no value, is undefined for (var i = s; i < E; i++) {A.push (this[i]);        } return A;        }//Key var a = 9, b = 0, c = false, d = 0; var result = A | | b;//The first is true, returns the value of a of 9 var result2 = B | | a;//the first is false and the second is true returns the value of a of 9 var result3 = B | | d;//the first false, whether the second value is False or True returns the value of the second 0 console.log (0 && true);//Can't go down, just stop to who, who output the result is 0 Console.log (9 && true && false);//result is False Console.log (9 && true && 0);//result is 0 CONSOLE.L OG (8 &&9);//The result is 9, because the end, the count is not down, stop at 9 position console.log (9 && ' a ');        Console.log (result);//Console.log (RESULT2);    Console.log (RESULT3); </script>

Sleepy, sleep, and continue tomorrow

javascript-Authoritative Guide reading notes (1)

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.