随笔分类 - ES6
摘要:class A { constructor() { this.inside = function () {}; } outside() {} } const a1 = new A(); const a2 = new A(); console.log(a1.outside a2.outside); /
阅读全文
摘要:初识 async 函数表示这个函数内部有异步请求,如果这个 async 函数没有返回值,那么这个 async 仅仅只是一个标识而已. await 需要结合 async 函数一起使用,它通常用于等待一个 Promise 函数或 async 函数的执行(你当然可以写个await 123,但这不会有任何作
阅读全文

浙公网安备 33010602011771号