<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)