风马牛不相及

Results 15 comments of 风马牛不相及

[Using event handlers (the most compatible way)](https://developers.google.com/web/fundamentals/performance/lazy-loading-guidance/images-and-video/)

@terrywangt 不错哦,给你高亮显示了。之前reduce也是循环判断,最后换成了先初始化 😃

@YuYuBei 👍 @medeen 可以看下这个文章[js的执行上下文](https://github.com/xiaohesong/TIL/blob/master/front-end/javascript/%E6%89%A7%E8%A1%8C%E4%B8%8A%E4%B8%8B%E6%96%87.md) 对js的执行有个了解

@YuYuBei 嗯,看到一些不错的会记录下来

```js class Man { constructor(name) { this.name = name console.log(`Hi! This is ${name}`) this.queue = [] setTimeout(() => { this.next() }, 0) } toQueue(fn, isFirst) { if(isFirst) { this.queue.unshift(fn) }...

来实现个bind函数。 ```js bind = (fn, _this, ...bindArgs) => (...args) => fn.apply(_this, [...bindArgs, ...args]) ```

@withzhaoyu 这个叫做"tagged template"。[mdn--Template literals (Template strings)](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#Description)

> 输出什么? ```js const name = "Lydia"; age = 21; console.log(delete name); console.log(delete age); ``` - [x] A:` false`, `true` - [ ] B: `"Lydia"`, `21` - [ ] C:...

> 下面`console.log`注释掉的值应该是什么语句才可以输出对应的内容? ```js function* startGame() { const answer = yield "Do you love JavaScript?"; if (answer !== "Yes") { return "Oh wow... Guess we're gone here"; } return "JavaScript loves...

> 下面会输出哪一个? ```js var status = "😎" setTimeout(() => { const status = "😍" const data = { status: "🥑", getStatus() { return this.status } } console.log(data.getStatus()) console.log(data.getStatus.call(this)) }, 0)...