We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
遍历器对象实质是指针对象(保存一个指针以及next方法以移动指针位置)
obj[Symbol.iterator]=function(){//一个简单的遍历器对象生成函数 var index=0; return{ next:function(){ if(index<3){ index++; return {value:index,done:false}; }else{ return {done:true}; } } } }
The text was updated successfully, but these errors were encountered:
其他参考 Promise面试精选 可以参考Promise用法
Sorry, something went wrong.
No branches or pull requests
2020/03/24 iterator和for...of循环
遍历器对象实质是指针对象(保存一个指针以及next方法以移动指针位置)
forEach vs. for...in vs. for...of
forEach无法中途跳出循环
for...in遍历所有键名,仅适用于对象
for...of在遍历数组时不会输出非数字键,可用于任何iterable对象
The text was updated successfully, but these errors were encountered: