Permalink
Browse files

Update generators.js

Fix syntax error in demo
1 parent 68ee74e commit 9702f4363a8247f74d8ac7c11b303884a1900ada @arv arv committed on GitHub Aug 24, 2016
Showing with 4 additions and 5 deletions.
  1. +4 −5 demo/generators.js
View
@@ -5,11 +5,10 @@ function iterateElements(array) {
var index = 0;
var rv = {};
rv[Symbol.iterator] = {
- next() {
- if (index < array.length)
- return {value: array[index++], done: false};
- return {done: true};
- }
+ next() {
+ if (index < array.length)
+ return {value: array[index++], done: false};
+ return {done: true};
}
};
return rv;

0 comments on commit 9702f43

Please sign in to comment.