
前端面试题
发布日期:2021-05-09 14:20:21
浏览次数:44
分类:精选文章
本文共 3656 字,大约阅读时间需要 12 分钟。
���������������������������������������������������������������������������Promise���Generator ������ async/await���������������������������������������������������������������
������Promise
1. ������������
Promise ������������������������������������ loos ���������
- ������������������������������s an asynchronous operation 's���������
- ������������������Promise ������������������������������������������������������������
- ��������������������������������������� API������
resolve()
���reject()
������������������������������then()
���catch()
������������
2. ������
- ��������������� Promise ������������������������������������
pending
������������fulfilled
������������rejected
��������� - ������������������������������������������������������������������������������������������
- ������������������������������������������������������������
resolve
���������������������������������������������������������������reject
������������������������������������������������������
3. ������ API
then
������������������������ Promise ������������������reject
������������������������������������ Promise���all
������������������ Promise ��������������� Promise��������������������� Promise ���������race
������������������ Promise ��������������� Promise��������������������������� Promise ���������finally
������������ Promise ������������������������������������������
2. async/await
1. ������������
async
���������������������������������������await
���������������������������������������������- ���������������������������������������������������������������
2. ������������}
- ������������������������������������������������������������������������������������������
await
������������������������������ Promise ������������������������������ - ���������������������������������������������������������������������������������������������������������������������������������������
- ������������������������������������������������������������������������������������������������������������������������������
- ������ Promise ��������� async/await ��� Promise ������������������������������������������������������������
3. ������������...
- ������������������������������������������������������������������������������������������������������������
3. Generator ������
1. ���������������
- Generator ������������
*
���������������������function* myGenerator() {}
��� - ������������������������������������������
yield
��������������������� - ���������������������������������������������
next()
���������������������
2. ������������
- ���������������
next()
��������������������������������� - Generator ������������������������
return
���������������yield
���������������������
3. ������
- ������������������������������������������������������������������������������
- ���������������������������������������������������������������������
4. ��� Promise���async/await ���������
- Promise ��� Classic Callback ������������������������������������������
- Generator ��������������������������������������� async/await ���������
- async/await ��������� Generator ������������������������������������������������������
next()
���������������������������������������
Promise���Generator ��� async/await ���������
������������������������������������������������������������������������������������������
- Promise������������������������������������������������������������������������������
- Generator���������������������������������������������������������������������������������������������
- async/await��������� Promise ��� Generator ���������������������������������������������������������
������������������������������������������������������������������������������������������
发表评论
最新留言
路过按个爪印,很不错,赞一个!
[***.219.124.196]2025年03月31日 13时46分56秒
关于作者

喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
spring 的@ComponentScan 理解
2021-05-10
C++ e 神秘数组——vector
2021-05-10
day04_CSS选择器
2021-05-10
js 获取时间戳的方法
2021-05-10
C++ 底层语言的信仰-指针分类
2021-05-10
DFS
2021-05-10
概念模型向逻辑模型的转换
2021-05-10
python基础语法
2021-05-10
const修饰指针(常量指针与指针常量的区别)
2021-05-10
设计模式-创建型02-工厂模式-工厂方法模式01
2021-05-10
设计模式-行为型09-访问者模式(Visitor)
2021-05-10
微信小程序sort时间排序
2021-05-10
13个JavaScript单行式代码
2021-05-10
5个很常用的CSS3网页小实例
2021-05-10
前端基础知识整理汇总(上)
2021-05-10
微信小程序 - 实现左滑动删除功能
2021-05-10
<s>
2021-05-10
OBDC无法创建sql server连接
2021-05-10