摘要:
<script> function x() { } //为函数x的prototype原型对象添加add方法 x.prototype.add = function (a) { return a } var xxx = new x() console.log(xxx.add);//函数add conso 阅读全文
摘要:
<script> var x = 0 Object.defineProperty(this, 'a', { get() { x++ console.log('get'); return x } }) console.log(a 1 && a 2 && a 3); var obj = { } Obje 阅读全文