fix typos

This commit is contained in:
qianguyihao
2020-08-24 10:14:32 +08:00
parent 5ae9416e6f
commit fc6cedde18
11 changed files with 16 additions and 16 deletions

View File

@@ -120,7 +120,7 @@
![](http://img.smyhvae.com/20180307_1109.png)
重要上方代码中最重要的那行每个函数都有`prototype`属性于是构造函数也有这个属性这个属性是一个对象现在**我们把`Parent`的实例赋值给了`Child``prototye`**从而实现**继承**此时`Child`构造函数`Parent`的实例`Child`的实例构成一个三角关系于是
重要上方代码中最重要的那行每个函数都有`prototype`属性于是构造函数也有这个属性这个属性是一个对象现在**我们把`Parent`的实例赋值给了`Child``prototype`**从而实现**继承**此时`Child`构造函数`Parent`的实例`Child`的实例构成一个三角关系于是
- `new Child.__proto__ === new Parent()`的结果为true

View File

@@ -158,7 +158,7 @@ then
//开始执行异步操作这里开始写异步的代码比如ajax请求 or 开启定时器)
if (异步的ajax请求成功) {
console.log('333');
resolve();//如果请求成功了请写resolve()此时promise的状态会被自动修改为fullfilled
resolve();//如果请求成功了请写resolve()此时promise的状态会被自动修改为fulfilled
} else {
reject();//如果请求失败了请写reject()此时promise的状态会被自动修改为rejected
}
@@ -167,7 +167,7 @@ then
//调用promise的then()
promise.then(() => {
//如果promise的状态为fullfilled则执行这里的代码
//如果promise的状态为fulfilled则执行这里的代码
console.log('成功了');
}
, () => {