摘要: var o3 = Object.create(Object.prototype); //equals new Object()//function inherit(p) { if(p==null) throw TypeError(); if(Object.create) { return Object.create(p); } var t = typeof p; if(t!=="object" && t!=="function") throw TypeError(); function f() {}; f.prototype = p; . 阅读全文
posted @ 2013-10-18 19:43 LambdaTea 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 1 //object 2 var book = { 3 topic: "JavaScript", 4 fat : true 5 }; 6 book.topic = "CPP"; 7 8 //array 9 var primes = [2,3,5,7];10 primes.length11 12 //13 var points = [14 {x:0, y:0},15 {x:1, y:1}16 ];17 var data = {18 t... 阅读全文
posted @ 2013-10-18 17:23 LambdaTea 阅读(154) 评论(0) 推荐(0) 编辑