Skip to content

强大而难懂的迭代器 | hpoenixf's blog #11

Description

@hpoenixf

http://hpoenixf.com/posts/18922/

迭代器什么是迭代器js迭代器是一个对象,具有next方法,可以返回序列中的带有done和value两个属性的下一项。 1234567891011function makeIterator(array){ var nextIndex = 0;4 return { next: function(){ return nextInd

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions