摘要:
The Visual Studio IntelliCode extension provides AI-assisted development features for Python, TypeScript/JavaScript and Java developers in Visual Stud 阅读全文
摘要:
一个最基本的Generator函数格式如下,函数体内部要使用yield修饰符则必须在函数名前加上*号 let y = 0; function *testYield(x){ console.log('before yield') y = yield x + 1; console.log('after 阅读全文
摘要:
es6的箭头函数中this指向是跟普通function中的this指向不同的,普通function的this指向取决于调用function的对象, 而箭头函数的this指向取决于声明它的对象,看下面这个例子 var a1 = 1; function func1(){ this.a1 = 2; con 阅读全文