diff --git a/JS/JS-ch.md b/JS/JS-ch.md index e2ac2e23..4f1d2540 100644 --- a/JS/JS-ch.md +++ b/JS/JS-ch.md @@ -1123,7 +1123,7 @@ function MyPromise(fn) { }) } // 用于解决以下问题 - // new Promise(() => throw Error('error)) + // new Promise(() => throw Error('error')) try { fn(_this.resolve, _this.reject); } catch (e) { diff --git a/JS/JS-en.md b/JS/JS-en.md index e0191761..a9cc1a19 100644 --- a/JS/JS-en.md +++ b/JS/JS-en.md @@ -859,7 +859,7 @@ function MyPromise(fn) { } // to solve the following problem - // `new Promise(() => throw Error('error))` + // `new Promise(() => throw Error('error'))` try { fn(_this.resolve, _this.reject); } catch (e) {