2013年9月26日
摘要: 下面说一下for… in语句。可直接把下面的代码复制到浏览器的控制台或Node环境下去执行。~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//用来快速迭代对象。var o ={name:'dylan',age:24,num:110};for(var test in o){ console.log("o["+test+"]= "+o[test]);}console.log("~~~~~~~~~~~")Object.prototype.getName =function(){return this.n 阅读全文
posted @ 2013-09-26 20:36 idylan 阅读(2772) 评论(2) 推荐(1) 编辑