摘要: const PENDING = 'pending', FULFILLED = 'fulfilled', REJECTED = 'rejected' class MyPromise { constructor(executor) { this.state = PENDING this.value = 阅读全文
posted @ 2021-09-24 22:08 麻花的野望 阅读(18) 评论(0) 推荐(0) 编辑
摘要: <script> /* Promise面试题 */ // 1.基本的Promise面试题 const promsie = new Promise((resolve, reject) => { console.log(1) resolve() console.log(2) }) promsie.the 阅读全文
posted @ 2021-09-24 22:02 麻花的野望 阅读(29) 评论(0) 推荐(0) 编辑