摘要:
基本使用 const promise1 = new Promise((res, rej) =>{ //状态 pending res() //or rej() }) promise1.then(res => { // 状态 fulfilled 进入这里},err => { // 状态 rejected 阅读全文
posted @ 2021-01-26 22:55
baixinL
阅读(81)
评论(0)
推荐(0)
摘要:
属性和方法都可以写在构造函数上,为什么还要使用prototype? 函数上自带【prototype】属性,prototype上的【方法、属性】可被构造函数实例共享 对象上自带【__proto__】属性,指向其构造函数prototype,但在对象上找【属性、方法】找不到时,会通过__proto__继续 阅读全文
posted @ 2021-01-26 21:43
baixinL
阅读(338)
评论(0)
推荐(0)

浙公网安备 33010602011771号