function _extends(d, b) {
for (var p in b) {
if (b.hasOwnProperty(p)) {
d[p] = b[p];
}
}
function __() {
this.constructor = d;
}
__.prototype = b.prototype;
d.prototype = new __();
}
在别的代码库里面发现的代码,用来实现 js 的 oo ,但是对于 js 的 prototype 实在是不懂,有大神给讲讲实现的逻辑么,非常感谢!