V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  AEP203  ›  全部回复第 2 页 / 共 2 页
回复总数  22
1  2  
2018-05-12 01:10:34 +08:00
回复了 yozman 创建的主题 程序员 招募前端队友,坐标:北京望京酒仙桥
1,2 略。
3.
这题有问题,`super` 是个关键字,`classA` 如果不显式 `extends` 一个类的话, 在 `classA` 的 `constructor` 中调用 `super` 是会报语法错误的。
不考虑 `super`的话就这样:
```javascript
function extend(base) {
return function(_constructor) {
Object.setPrototypeOf(_constructor.prototype, base.prototype);
Object.setPrototypeOf(_constructor , base);
};
}
```
4.
```javascript
return input.reduce((a,b) => a+ (~b<< 29 >>> 30 << 1) , 0);
```
1  2  
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   5222 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 15ms · UTC 03:46 · PVG 11:46 · LAX 19:46 · JFK 22:46
♥ Do have faith in what you're doing.