摘要: 遇到一个面试题 要求写一个函数A,每次进行new操作时候能输出2,3,4,5... new A() // 输出2 new A() // 输出3 new A() // 输出4 function A() { this.a++ console.log(this.a) } A.prototype.a = 1 阅读全文
posted @ 2019-05-16 00:21 hh9515 阅读(282) 评论(0) 推荐(0)