摘要: var myObject = { num: 0, getNum: function (inc) { this.num += typeof inc 'number' ? inc : 1; } }; myObject.getNum(); console.log(myObject.num); // 1 m 阅读全文
posted @ 2017-09-10 21:30 zbyD666 阅读(241) 评论(0) 推荐(0) 编辑