Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

说一说 promise,有几个状态,通过 catch 捕获到 reject 之后,在 catch 后面还能继续执行 then 方法嘛,如果能执行执行的是第几个回调函数 #198

Open
lgwebdream opened this issue Jul 6, 2020 · 2 comments
Labels
JavaScript teach_tag 伴鱼 company 喜马拉雅 company

Comments

@lgwebdream
Copy link
Owner

No description provided.

@lgwebdream lgwebdream added JavaScript teach_tag 伴鱼 company 喜马拉雅 company labels Jul 6, 2020
@lgwebdream
Copy link
Owner Author

扫描下方二维码,获取答案以及详细解析,同时可解锁800+道前端面试题。

@zizxzy
Copy link

zizxzy commented Nov 16, 2021

promise一共有三种状态:fulfilled(异步操作成功),rejected(异步操作失败),pending(异步操作未完成)。
通过catch捕获到reject之后,在catch后面可以继续执行then方法,catch返回的是一个新的promise实例,执行的是then方法的第一个回调函数。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JavaScript teach_tag 伴鱼 company 喜马拉雅 company
Projects
None yet
Development

No branches or pull requests

2 participants