From 25c4579c93c5f3ba3f64c81f59acf6bc1b36ef75 Mon Sep 17 00:00:00 2001 From: DuYi Date: Tue, 27 Aug 2024 09:23:22 +0800 Subject: [PATCH] auto commit --- 01. Promise基础/1.js | 1 + 01. Promise基础/2.js | 1 + 01. Promise基础/3.js | 1 + 01. Promise基础/笔记.md | 2 +- 01. Promise基础/练习题/p1.js | 1 + 01. Promise基础/练习题/p2.html | 1 + 01. Promise基础/练习题/p3.html | 1 + 01. Promise基础/练习题/p4.js | 1 + 01. Promise基础/练习题参考答案/p1.js | 1 + 01. Promise基础/练习题参考答案/p2.html | 1 + 01. Promise基础/练习题参考答案/p3.html | 1 + 01. Promise基础/练习题参考答案/p4.js | 1 + 02. Promise的链式调用/1.js | 1 + 02. Promise的链式调用/2.js | 1 + 02. Promise的链式调用/3.js | 1 + 02. Promise的链式调用/笔记.md | 1 + 02. Promise的链式调用/练习题.1/p1.js | 1 + 02. Promise的链式调用/练习题.1/p2.js | 1 + 02. Promise的链式调用/练习题.1/p3.js | 1 + 02. Promise的链式调用/练习题.1/p4.js | 1 + 02. Promise的链式调用/练习题.1/p5.js | 1 + 02. Promise的链式调用/练习题/p1.js | 1 + 02. Promise的链式调用/练习题/p2.js | 1 + 02. Promise的链式调用/练习题/p3.js | 1 + 02. Promise的链式调用/练习题/p4.js | 1 + 02. Promise的链式调用/练习题/p5.js | 1 + 03. Promise的静态方法/1.js | 1 + 03. Promise的静态方法/2.js | 1 + 03. Promise的静态方法/笔记.md | 1 + 03. Promise的静态方法/练习题/p1.js | 1 + 03. Promise的静态方法/练习题参考答案/p1.html | 1 + 03. Promise的静态方法/练习题参考答案/p1.js | 1 + 04. async和await/1.js | 1 + 04. async和await/2.js | 1 + 04. async和await/笔记.md | 1 + 04. async和await/练习题/p1.html | 1 + 04. async和await/练习题/p2.js | 1 + 04. async和await/练习题参考答案/p1.html | 1 + 04. async和await/练习题参考答案/p2.js | 1 + 05. Promise相关面试题/1.js | 1 + 05. Promise相关面试题/2.js | 1 + 05. Promise相关面试题/3.js | 1 + 05. Promise相关面试题/4.js | 1 + 05. Promise相关面试题/5.js | 1 + 05. Promise相关面试题/6.js | 1 + 05. Promise相关面试题/7.js | 1 + 05. Promise相关面试题/8.js | 1 + 05. Promise相关面试题/9.js | 1 + 05. Promise相关面试题/笔记.md | 1 + 06. 手写Promise/MyPromise.js | 1 + 06. 手写Promise/说明.md | 1 + Promise面试题归总.md | 2 +- Promise面试题归总(无答案版).md | 1 + 53 files changed, 53 insertions(+), 2 deletions(-) diff --git a/01. Promise基础/1.js b/01. Promise基础/1.js index bf9272c..b5955e5 100644 --- a/01. Promise基础/1.js +++ b/01. Promise基础/1.js @@ -67,3 +67,4 @@ sendMessage( ); } ); + diff --git a/01. Promise基础/2.js b/01. Promise基础/2.js index 9234c97..6da63fa 100644 --- a/01. Promise基础/2.js +++ b/01. Promise基础/2.js @@ -21,3 +21,4 @@ pro.then( console.log('不好意思,', reason); } ); + diff --git a/01. Promise基础/3.js b/01. Promise基础/3.js index 4345d8c..ffecb20 100644 --- a/01. Promise基础/3.js +++ b/01. Promise基础/3.js @@ -31,3 +31,4 @@ sendMessage('李建刚').then( console.log('失败!', reply); } ); + diff --git a/01. Promise基础/笔记.md b/01. Promise基础/笔记.md index 1bede83..291d3dc 100644 --- a/01. Promise基础/笔记.md +++ b/01. Promise基础/笔记.md @@ -203,4 +203,4 @@ sendMessage('李建国').then( > 至此,回调地狱的问题仍然没能解决 > -> 要解决回调地狱,还需要进一步学习Promise的知识 \ No newline at end of file +> 要解决回调地狱,还需要进一步学习Promise的知识 diff --git a/01. Promise基础/练习题/p1.js b/01. Promise基础/练习题/p1.js index 729673d..9c220a6 100644 --- a/01. Promise基础/练习题/p1.js +++ b/01. Promise基础/练习题/p1.js @@ -10,3 +10,4 @@ function delay(duration) {} // 2. 按照要求,调用delay函数,完成程序 // 利用delay函数,等待1秒钟,输出:finish + diff --git a/01. Promise基础/练习题/p2.html b/01. Promise基础/练习题/p2.html index 743c413..70d74de 100644 --- a/01. Promise基础/练习题/p2.html +++ b/01. Promise基础/练习题/p2.html @@ -24,3 +24,4 @@ + diff --git a/01. Promise基础/练习题/p3.html b/01. Promise基础/练习题/p3.html index 884419f..1d7dc74 100644 --- a/01. Promise基础/练习题/p3.html +++ b/01. Promise基础/练习题/p3.html @@ -26,3 +26,4 @@ + diff --git a/01. Promise基础/练习题/p4.js b/01. Promise基础/练习题/p4.js index caf5cdf..dcfb05d 100644 --- a/01. Promise基础/练习题/p4.js +++ b/01. Promise基础/练习题/p4.js @@ -14,3 +14,4 @@ new Promise((resolve, reject) => { resolve(2); console.log('任务结束'); }); + diff --git a/01. Promise基础/练习题参考答案/p1.js b/01. Promise基础/练习题参考答案/p1.js index 76401fd..2fb5cfa 100644 --- a/01. Promise基础/练习题参考答案/p1.js +++ b/01. Promise基础/练习题参考答案/p1.js @@ -19,3 +19,4 @@ function delay(duration) { delay(1000).then(() => { console.log('finish'); }); + diff --git a/01. Promise基础/练习题参考答案/p2.html b/01. Promise基础/练习题参考答案/p2.html index 36ade7e..970e89b 100644 --- a/01. Promise基础/练习题参考答案/p2.html +++ b/01. Promise基础/练习题参考答案/p2.html @@ -57,3 +57,4 @@ + diff --git a/01. Promise基础/练习题参考答案/p3.html b/01. Promise基础/练习题参考答案/p3.html index dc520ca..d0a1095 100644 --- a/01. Promise基础/练习题参考答案/p3.html +++ b/01. Promise基础/练习题参考答案/p3.html @@ -37,3 +37,4 @@ + diff --git a/01. Promise基础/练习题参考答案/p4.js b/01. Promise基础/练习题参考答案/p4.js index 413ef23..585c666 100644 --- a/01. Promise基础/练习题参考答案/p4.js +++ b/01. Promise基础/练习题参考答案/p4.js @@ -16,3 +16,4 @@ console.log(pro1); // resolve(2); // 无效 // console.log('任务结束'); // }); + diff --git a/02. Promise的链式调用/1.js b/02. Promise的链式调用/1.js index 4a425a5..caca5f0 100644 --- a/02. Promise的链式调用/1.js +++ b/02. Promise的链式调用/1.js @@ -3,3 +3,4 @@ new Promise((resolve, reject) => { }).catch((err) => { console.log('失败了!!', err); }); + diff --git a/02. Promise的链式调用/2.js b/02. Promise的链式调用/2.js index 35831ca..9c93e1c 100644 --- a/02. Promise的链式调用/2.js +++ b/02. Promise的链式调用/2.js @@ -10,3 +10,4 @@ const pro2 = pro1.then(() => { setTimeout(() => { console.log(pro2); }, 1000); + diff --git a/02. Promise的链式调用/3.js b/02. Promise的链式调用/3.js index 12d4ffa..7d7716b 100644 --- a/02. Promise的链式调用/3.js +++ b/02. Promise的链式调用/3.js @@ -50,3 +50,4 @@ sendMessage('李建国') console.log('邓哥命犯天煞孤星,无伴终老,孤独一生'); } ); + diff --git a/02. Promise的链式调用/笔记.md b/02. Promise的链式调用/笔记.md index f9341a8..62dd5b4 100644 --- a/02. Promise的链式调用/笔记.md +++ b/02. Promise的链式调用/笔记.md @@ -101,3 +101,4 @@ sendMessage('李建国') ); ``` + diff --git a/02. Promise的链式调用/练习题.1/p1.js b/02. Promise的链式调用/练习题.1/p1.js index 8aa39b1..0e67d36 100644 --- a/02. Promise的链式调用/练习题.1/p1.js +++ b/02. Promise的链式调用/练习题.1/p1.js @@ -12,3 +12,4 @@ new Promise((resolve, reject) => { .then((data) => { console.log(data); }); + diff --git a/02. Promise的链式调用/练习题.1/p2.js b/02. Promise的链式调用/练习题.1/p2.js index 0aa574b..ba6704b 100644 --- a/02. Promise的链式调用/练习题.1/p2.js +++ b/02. Promise的链式调用/练习题.1/p2.js @@ -17,3 +17,4 @@ const pro = new Promise((resolve, reject) => { setTimeout(() => { console.log(pro); }, 1000); + diff --git a/02. Promise的链式调用/练习题.1/p3.js b/02. Promise的链式调用/练习题.1/p3.js index 372ecda..9d3990f 100644 --- a/02. Promise的链式调用/练习题.1/p3.js +++ b/02. Promise的链式调用/练习题.1/p3.js @@ -17,3 +17,4 @@ const pro = new Promise((resolve, reject) => { setTimeout(() => { console.log(pro); }, 1000); + diff --git a/02. Promise的链式调用/练习题.1/p4.js b/02. Promise的链式调用/练习题.1/p4.js index 27e61d1..55bf987 100644 --- a/02. Promise的链式调用/练习题.1/p4.js +++ b/02. Promise的链式调用/练习题.1/p4.js @@ -14,3 +14,4 @@ new Promise((resolve, reject) => { .then((res) => { console.log(res); }); + diff --git a/02. Promise的链式调用/练习题.1/p5.js b/02. Promise的链式调用/练习题.1/p5.js index 7ebc06b..6837a31 100644 --- a/02. Promise的链式调用/练习题.1/p5.js +++ b/02. Promise的链式调用/练习题.1/p5.js @@ -16,3 +16,4 @@ setTimeout(() => { console.log('promise1', promise1); console.log('promise2', promise2); }, 2000); + diff --git a/02. Promise的链式调用/练习题/p1.js b/02. Promise的链式调用/练习题/p1.js index c77ad33..bf8e5b4 100644 --- a/02. Promise的链式调用/练习题/p1.js +++ b/02. Promise的链式调用/练习题/p1.js @@ -19,3 +19,4 @@ console.log(pro1, pro2, pro3); setTimeout(() => { console.log(pro1, pro2, pro3); }, 2000); + diff --git a/02. Promise的链式调用/练习题/p2.js b/02. Promise的链式调用/练习题/p2.js index 824ce4d..d063586 100644 --- a/02. Promise的链式调用/练习题/p2.js +++ b/02. Promise的链式调用/练习题/p2.js @@ -13,3 +13,4 @@ new Promise((resolve, reject) => { .then((res) => { console.log(res); }); + diff --git a/02. Promise的链式调用/练习题/p3.js b/02. Promise的链式调用/练习题/p3.js index b0f8dc7..62e815a 100644 --- a/02. Promise的链式调用/练习题/p3.js +++ b/02. Promise的链式调用/练习题/p3.js @@ -13,3 +13,4 @@ new Promise((resolve, reject) => { .then((res) => { console.log(res); }); + diff --git a/02. Promise的链式调用/练习题/p4.js b/02. Promise的链式调用/练习题/p4.js index 47e70b0..b98cb80 100644 --- a/02. Promise的链式调用/练习题/p4.js +++ b/02. Promise的链式调用/练习题/p4.js @@ -14,3 +14,4 @@ new Promise((resolve, reject) => { .then((res) => { console.log(res); }); + diff --git a/02. Promise的链式调用/练习题/p5.js b/02. Promise的链式调用/练习题/p5.js index 7ebc06b..6837a31 100644 --- a/02. Promise的链式调用/练习题/p5.js +++ b/02. Promise的链式调用/练习题/p5.js @@ -16,3 +16,4 @@ setTimeout(() => { console.log('promise1', promise1); console.log('promise2', promise2); }, 2000); + diff --git a/03. Promise的静态方法/1.js b/03. Promise的静态方法/1.js index 9cc1d4f..5d701d7 100644 --- a/03. Promise的静态方法/1.js +++ b/03. Promise的静态方法/1.js @@ -48,3 +48,4 @@ Promise.allSettled([cook(), wash(), sweep()]).then((result) => { .join(';'); console.log(report); }); + diff --git a/03. Promise的静态方法/2.js b/03. Promise的静态方法/2.js index e2512be..4c1086c 100644 --- a/03. Promise的静态方法/2.js +++ b/03. Promise的静态方法/2.js @@ -14,3 +14,4 @@ setTimeout(() => { // pro.catch((result) => { // console.log('失败', result.errors); // }); + diff --git a/03. Promise的静态方法/笔记.md b/03. Promise的静态方法/笔记.md index 5687989..3da0211 100644 --- a/03. Promise的静态方法/笔记.md +++ b/03. Promise的静态方法/笔记.md @@ -93,3 +93,4 @@ Promise.allSettled([cook(), wash(), sweep()]).then((result) => { }); ``` + diff --git a/03. Promise的静态方法/练习题/p1.js b/03. Promise的静态方法/练习题/p1.js index 8ed6b1d..3099ea6 100644 --- a/03. Promise的静态方法/练习题/p1.js +++ b/03. Promise的静态方法/练习题/p1.js @@ -28,3 +28,4 @@ function fetchStudents(page) { // 获取1-10页的学生,打印最先获取到的数据,如果全部都获取失败,则打印所有的错误消息 // 获取1-10页的学生,输出最先得到的结果(有结果输出结果,有错误输出错误) + diff --git a/03. Promise的静态方法/练习题参考答案/p1.html b/03. Promise的静态方法/练习题参考答案/p1.html index 66fadbd..41a8e8b 100644 --- a/03. Promise的静态方法/练习题参考答案/p1.html +++ b/03. Promise的静态方法/练习题参考答案/p1.html @@ -10,3 +10,4 @@ + diff --git a/03. Promise的静态方法/练习题参考答案/p1.js b/03. Promise的静态方法/练习题参考答案/p1.js index b2d4bf7..d23cff1 100644 --- a/03. Promise的静态方法/练习题参考答案/p1.js +++ b/03. Promise的静态方法/练习题参考答案/p1.js @@ -60,3 +60,4 @@ Promise.race(proms).then( console.log(err); } ); + diff --git a/04. async和await/1.js b/04. async和await/1.js index 199761f..e7e4052 100644 --- a/04. async和await/1.js +++ b/04. async和await/1.js @@ -27,3 +27,4 @@ function delay(duration) { // console.log('失败'); // } // ); + diff --git a/04. async和await/2.js b/04. async和await/2.js index 854478a..1c03897 100644 --- a/04. async和await/2.js +++ b/04. async和await/2.js @@ -43,3 +43,4 @@ function sendMessage(name) { console.log('邓哥注定孤独一生'); } })(); + diff --git a/04. async和await/笔记.md b/04. async和await/笔记.md index c68a530..2767bad 100644 --- a/04. async和await/笔记.md +++ b/04. async和await/笔记.md @@ -175,3 +175,4 @@ async function proposal() { proposal(); ``` + diff --git a/04. async和await/练习题/p1.html b/04. async和await/练习题/p1.html index d169e85..12769cf 100644 --- a/04. async和await/练习题/p1.html +++ b/04. async和await/练习题/p1.html @@ -11,3 +11,4 @@ } // 利用getHeroes方法,获取所有的英雄数据,将英雄名称显示到页面的列表中 + diff --git a/04. async和await/练习题/p2.js b/04. async和await/练习题/p2.js index 8950bb2..b12d4f2 100644 --- a/04. async和await/练习题/p2.js +++ b/04. async和await/练习题/p2.js @@ -5,3 +5,4 @@ function delay(duration) {} // 利用delay函数,等待3次,每次等待1秒,每次等待完成后输出ok // 等待1秒->ok->等待1秒->ok->等待1秒->ok + diff --git a/04. async和await/练习题参考答案/p1.html b/04. async和await/练习题参考答案/p1.html index 1d4e7ff..90f5eb3 100644 --- a/04. async和await/练习题参考答案/p1.html +++ b/04. async和await/练习题参考答案/p1.html @@ -17,3 +17,4 @@ ul.innerHTML = result; })(); + diff --git a/04. async和await/练习题参考答案/p2.js b/04. async和await/练习题参考答案/p2.js index f2f54d0..f58f9c7 100644 --- a/04. async和await/练习题参考答案/p2.js +++ b/04. async和await/练习题参考答案/p2.js @@ -31,3 +31,4 @@ function delay(duration) { // .then(() => { // console.log('ok'); // }); + diff --git a/05. Promise相关面试题/1.js b/05. Promise相关面试题/1.js index df5a995..1b75391 100644 --- a/05. Promise相关面试题/1.js +++ b/05. Promise相关面试题/1.js @@ -9,3 +9,4 @@ promise.then(() => { }); console.log(4); + diff --git a/05. Promise相关面试题/2.js b/05. Promise相关面试题/2.js index 2af03b7..c6473c1 100644 --- a/05. Promise相关面试题/2.js +++ b/05. Promise相关面试题/2.js @@ -12,3 +12,4 @@ promise.then(() => { }); console.log(4); + diff --git a/05. Promise相关面试题/3.js b/05. Promise相关面试题/3.js index b572e96..6fce198 100644 --- a/05. Promise相关面试题/3.js +++ b/05. Promise相关面试题/3.js @@ -14,3 +14,4 @@ setTimeout(() => { console.log('promise1', promise1); console.log('promise2', promise2); }, 2000); + diff --git a/05. Promise相关面试题/4.js b/05. Promise相关面试题/4.js index 453f854..d25f26a 100644 --- a/05. Promise相关面试题/4.js +++ b/05. Promise相关面试题/4.js @@ -12,3 +12,4 @@ async function m() { m(); console.log(2); + diff --git a/05. Promise相关面试题/5.js b/05. Promise相关面试题/5.js index 88bd44b..0980a40 100644 --- a/05. Promise相关面试题/5.js +++ b/05. Promise相关面试题/5.js @@ -10,3 +10,4 @@ async function m() { })(); console.log(3); + diff --git a/05. Promise相关面试题/6.js b/05. Promise相关面试题/6.js index 1c4f9f2..b12dea2 100644 --- a/05. Promise相关面试题/6.js +++ b/05. Promise相关面试题/6.js @@ -21,3 +21,4 @@ m3().then((n) => { m3(); console.log(4); + diff --git a/05. Promise相关面试题/7.js b/05. Promise相关面试题/7.js index 507f0ed..a8e16d2 100644 --- a/05. Promise相关面试题/7.js +++ b/05. Promise相关面试题/7.js @@ -1 +1,2 @@ Promise.resolve(1).then(2).then(Promise.resolve(3)).then(console.log); + diff --git a/05. Promise相关面试题/8.js b/05. Promise相关面试题/8.js index 09cff15..2275083 100644 --- a/05. Promise相关面试题/8.js +++ b/05. Promise相关面试题/8.js @@ -26,3 +26,4 @@ a = new Promise(async (resolve, reject) => { }); console.log('end'); + diff --git a/05. Promise相关面试题/9.js b/05. Promise相关面试题/9.js index 0fac89d..50558be 100644 --- a/05. Promise相关面试题/9.js +++ b/05. Promise相关面试题/9.js @@ -22,3 +22,4 @@ new Promise(function (resolve) { console.log('promise2'); }); console.log('script end'); + diff --git a/05. Promise相关面试题/笔记.md b/05. Promise相关面试题/笔记.md index dafb9cf..e75b691 100644 --- a/05. Promise相关面试题/笔记.md +++ b/05. Promise相关面试题/笔记.md @@ -309,3 +309,4 @@ method(); // 输出: 失败 123 + diff --git a/06. 手写Promise/MyPromise.js b/06. 手写Promise/MyPromise.js index 7e79905..cb08ed2 100644 --- a/06. 手写Promise/MyPromise.js +++ b/06. 手写Promise/MyPromise.js @@ -291,3 +291,4 @@ class MyPromise { }); } } + diff --git a/06. 手写Promise/说明.md b/06. 手写Promise/说明.md index c91a676..3ff4df3 100644 --- a/06. 手写Promise/说明.md +++ b/06. 手写Promise/说明.md @@ -1,3 +1,4 @@ 手写 Promise 课程资料,仅提供最终的完整代码 至于每节课的代码,请同学们理解视频课程内容,然后自行手写,以达到最好的学习效果 + diff --git a/Promise面试题归总.md b/Promise面试题归总.md index 7da1332..7b80d96 100644 --- a/Promise面试题归总.md +++ b/Promise面试题归总.md @@ -186,4 +186,4 @@ console.log('script end'); ``` - \ No newline at end of file + diff --git a/Promise面试题归总(无答案版).md b/Promise面试题归总(无答案版).md index f07d09c..f2004a5 100644 --- a/Promise面试题归总(无答案版).md +++ b/Promise面试题归总(无答案版).md @@ -177,3 +177,4 @@ }); console.log('script end'); ``` +