Last active
September 27, 2019 11:36
-
-
Save leonardreidy/427a5bdb66482dc16116eeb7a5b1c19e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// An object that respects the iterable protocol | |
var anIterableObject = { | |
[Symbol.iterator]: function(){ return something } | |
}; | |
// An object that respects the iterator protocol and the iterable protocol | |
var anIterableIterator = { | |
next: function() { return {value: somevalue, done: trueorfalse }, | |
[Symbol.iterator]: function(){ return something } | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment