Liang Wang
Liang Wang
刚转行前端,学习了
```js let list = [ { id: 1, name: "部门A", parentId: 0 }, { id: 2, name: "部门B", parentId: 0 }, { id: 3, name: "部门C", parentId: 1 }, {...
***@***.*** added you to their Edison Mail+ Family Plan ***@***.*** added you to their Edison Mail+ Family Plan Welcome to the family! Access your new Edison Mail+ premium email features...
```js class LazyMan { constructor(name) { this.name = name; console.log(`Hi, I am ${name}`) this.taskQueue = [] setTimeout(() => { this.start() }) } async start() { for (let task of this.taskQueue)...
```js const nums = [0, 0, 1, 0, 0, 3, 12]; for (let i = 0, len = nums.length; i < len; ) { if (nums[i] === 0) { nums.splice(i,...
直接new Person()不就行了,何必多此一举 `var _Person = function() {}; _Person.prototype = Person.prototype; var me = new _Person(); `
@ginnko 2去掉之后remaining就一直等于wait,if 语句还怎么执行
**发现另外一个bug:** 假如obj的constructor重写,并且constructor.ptototype重写toString `var Func = function() {}; Func.prototype.toString = null; var obj = { constructor: Func };` // 返回值是 =>是["constructor", "toString"] 问题出在这句 `obj[prop] !== proto[prop] `
@sqfbeijing 为什么不行,可以的啊,严格模式只是淘汰了arguments.callee 和 arguments.caller
方法三: ` return !pos || item != ary[pos - 1];` 换成 ` return !pos || item !== ary[pos - 1];` 使用严格相等应该就行了吧