forked from lgwebdream/FE-Interview
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.md
executable file
·128 lines (106 loc) · 8.3 KB
/
README.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<h1 align="center">前端面试星球</h1>
<div align="center">
<a href="https://github.com/lgwebdream/FE-Interview/issues"><img alt="GitHub issues" src="https://img.shields.io/github/issues/lgwebdream/FE-Interview?color=success"></a>
<a href="https://github.com/lgwebdream/FE-Interview/network"><img alt="GitHub forks" src="https://img.shields.io/github/forks/lgwebdream/FE-Interview?color=success"></a>
<a href="https://github.com/lgwebdream/FE-Interview/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/lgwebdream/FE-Interview?color=success"></a>
</div>
<div align="center">
<img src="http://img-static.yidengxuetang.com/wxapp/github-img/t3.png" width="300px">
</div>
<div align="center" >
<table display="table">
<tr>
<th align="center"><b> <a href="https://github.com/lgwebdream/FE-Interview-Planet/blob/master/summarry/html.md"><img src="http://img-static.yidengxuetang.com/wxapp/github-img/html1.png" width="30px" > </b></th>
<th align="center"><b><a href="https://github.com/lgwebdream/FE-Interview-Planet/blob/master/summarry/css.md"><img src="http://img-static.yidengxuetang.com/wxapp/github-img/css.png" width="40px" > </b></th>
<th align="center"><b><a href="https://github.com/lgwebdream/FE-Interview-Planet/blob/master/summarry/javascript.md"><img src="http://img-static.yidengxuetang.com/wxapp/github-img/javascript1.png" width="35px" ></b></th>
<th align="center"><b><a href="https://github.com/lgwebdream/FE-Interview-Planet/blob/master/summarry/vue.md"><img src="http://img-static.yidengxuetang.com/wxapp/github-img/vue.svg" width="40px" ></b></th>
<th align="center"><b><a href="https://github.com/lgwebdream/FE-Interview-Planet/blob/master/summarry/react.md"><img src="http://img-static.yidengxuetang.com/wxapp/github-img/react1.png" width="40px" ></b></th>
<th align="center"><b><a href="https://github.com/lgwebdream/FE-Interview-Planet/blob/master/summarry/node.md"><img src="http://img-static.yidengxuetang.com/wxapp/github-img/node1.png" width="40px" ></b></th>
<th align="center"><b><a href="https://github.com/lgwebdream/FE-Interview-Planet/blob/master/summarry/webpack.md"><img src="http://img-static.yidengxuetang.com/wxapp/github-img/webpack.svg" width="40px" ></b></th>
<th align="center"><b><a href="https://github.com/lgwebdream/FE-Interview-Planet/blob/master/summarry/http.md"><img src="http://img-static.yidengxuetang.com/wxapp/github-img/http1.png" width="35px" ></b></th>
<th align="center"><b><a href="https://github.com/lgwebdream/FE-Interview-Planet/blob/master/summarry/algorithm.md"><img src="http://img-static.yidengxuetang.com/wxapp/github-img/algorithm3.svg" width="52px" ></b></th>
<th align="center"><b><a href="https://github.com/lgwebdream/FE-Interview-Planet/blob/master/summarry/program.md"><img src="http://img-static.yidengxuetang.com/wxapp/github-img/pro.svg" width="50px" ></b></th>
<th align="center"><b><a href="https://github.com/lgwebdream/FE-Interview-Planet/blob/master/summarry/other.md"><img src="http://img-static.yidengxuetang.com/wxapp/github-img/other.png" width="38px" > </b></th>
</tr>
<tr>
<td align="center"><b><a href="https://github.com/lgwebdream/FE-Interview-Planet/blob/master/summarry/html.md">Html</a></b></td>
<td align="center"><b><a href="https://github.com/lgwebdream/FE-Interview-Planet/blob/master/summarry/css.md"> Css </a></b></td>
<td align="center"><b><a href="https://github.com/lgwebdream/FE-Interview-Planet/blob/master/summarry/javascript.md">JavaScript</a></b></td>
<td align="center"><b><a href="https://github.com/lgwebdream/FE-Interview-Planet/blob/master/summarry/vue.md"> Vue </a></b></td>
<td align="center"><b><a href="https://github.com/lgwebdream/FE-Interview-Planet/blob/master/summarry/react.md">React</a></b></td>
<td align="center"><b><a href="https://github.com/lgwebdream/FE-Interview-Planet/blob/master/summarry/node.md">Node</a></b></td>
<td align="center"><b><a href="https://github.com/lgwebdream/FE-Interview-Planet/blob/master/summarry/webpack.md">Webpack</a></b></td>
<td align="center"><b><a href="https://github.com/lgwebdream/FE-Interview-Planet/blob/master/summarry/http.md">Http</a></b></td>
<td align="center"><b><a href="https://github.com/lgwebdream/FE-Interview-Planet/blob/master/summarry/algorithm.md">Algorithm</a></b></td>
<td align="center"><b><a href="https://github.com/lgwebdream/FE-Interview-Planet/blob/master/summarry/program.md">Coding</a></b></td>
<td align="center"><b><a href="https://github.com/lgwebdream/FE-Interview-Planet/blob/master/summarry/other.md">Other</a></b></td>
</tr>
</table>
</div>
<br />
## ☕ 每日一题
> 每天get一个知识点
### Day127:按要求完成 mergePromise 代码
```js
const timeout = (ms) =>
new Promise((resolve, reject) => {
setTimeout(() => {
resolve();
}, ms);
});
const ajax1 = () =>
timeout(2000).then(() => {
console.log("1");
return 1;
});
const ajax2 = () =>
timeout(1000).then(() => {
console.log("2");
return 2;
});
const ajax3 = () =>
timeout(2000).then(() => {
console.log("3");
return 3;
});
const mergePromise = (ajaxArray) => {
// 1,2,3 done [1,2,3] 此处写代码 请写出ES6、ES3 2中解法
};
mergePromise([ajax1, ajax2, ajax3]).then((data) => {
console.log("done");
console.log(data); // data 为[1,2,3]
});
// 执行结果为:1 2 3 done [1,2,3]
```
**[答案&解析](https://github.com/lgwebdream/FE-Interview-Planet/issues/940)**
<br />
## ⏱️ 资源更新
- **[Webpack5 新特性尝鲜实战案例](https://github.com/lgwebdream/FE-Interview/tree/master/demos/yd-webpack-demo)**
- **[node 接口转发有无做什么优化?node 起服务如何保证稳定性,平缓降级,重启等](https://github.com/lgwebdream/FE-Interview/issues/597)**
- **[说一下 Vue3 与 Vue2 的对比](https://github.com/lgwebdream/FE-Interview/issues/308)**
- **[vue 对数组的方法做了重写的操作,如何实现对 vue2 中对数组操作的 push()方法](https://github.com/lgwebdream/FE-Interview/issues/307)**
- **[Vue v-model 是如何实现的,语法糖实际是什么](https://github.com/lgwebdream/FE-Interview/issues/286)**
- **[说一下 vue-router 的原理](https://github.com/lgwebdream/FE-Interview/issues/262)**
- **[网站 SEO 怎么处理](https://github.com/lgwebdream/FE-Interview/issues/439)**
- **[Webpack 为什么慢,如何进行优化](https://github.com/lgwebdream/FE-Interview/issues/701)**
- **[Webpack 打包出来的体积太大,如何优化体积?](https://github.com/lgwebdream/FE-Interview/issues/657)**
- **[找出两个数组的交集元素](https://github.com/lgwebdream/FE-Interview/issues/806)**
- **[Import 和 CommonJS 在 webpack 打包过程中有什么不同](https://github.com/lgwebdream/FE-Interview/issues/360)**
- **[Webpack 打包时 Hash 码是怎么生成的?随机值存在一样的情况,如何避免?](https://github.com/lgwebdream/FE-Interview/issues/599)**
- **[介绍 Vue template 到 render 的过程](https://github.com/lgwebdream/FE-Interview/issues/704)**
- **[Vue data 中某一个属性的值发生改变后,视图会立即同步执行重新渲染吗?](https://github.com/lgwebdream/FE-Interview/issues/658)**
- **[简述 mixin、extends 的覆盖逻辑](https://github.com/lgwebdream/FE-Interview/issues/654)**
- **[Webpack 热更新的原理](https://github.com/lgwebdream/FE-Interview/issues/616)**
## 📚 面试题汇总入口
- **[每日一题汇总](https://github.com/lgwebdream/FE-Interview-Planet/blob/master/summarry/daily.md)**
- **[全部面试题汇总](https://github.com/lgwebdream/FE-Interview-Planet/blob/master/summarry/all.md)**
<br />
## 🏠 前端面试星球 Family
如果你在工作中遇到问题、在面试中遇到疑惑、在前端路上遇到了阻碍,都可以加入我们前端星球 Family,我们会竭尽全力为大家答疑解惑,让我们共同努力,一同成长。
<div align="center">
<img src="http://img-static.yidengxuetang.com/wxapp/github-img/bot.gif" width="500px" >
</div>
<br />
## 版权许可
![](http://img-static.yidengxuetang.com/wxapp/github-img/copyright.png)
本作品采用[知识共享署名-非商业性使用 4.0 国际许可协议](http://creativecommons.org/licenses/by-nc/4.0/)进行许可,只要保持原作者署名和非商用,您可以自由地阅读、分享、修改。