Skip to content

Confusing example in Iterators/Generators FAQ #17

Open
@Ms2ger

Description

[Symbol.iterator](){
  return {
    next: () => ({ value: this.next(), done: this[done] })
  , return: () => ({ value: this.resolve(), done: this[done] })
  , throw: () => ({ value: this.reject(), done: this[done] })
  }
}

What is done in this[done]?

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions