mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-24 18:32:22 +00:00
fix(iterator): 修改示例
This commit is contained in:
parent
c467637921
commit
562b0b5e07
@ -181,10 +181,9 @@ Obj.prototype[Symbol.iterator] = function() {
|
|||||||
function next() {
|
function next() {
|
||||||
if (current) {
|
if (current) {
|
||||||
var value = current.value;
|
var value = current.value;
|
||||||
var done = current.next === null;
|
|
||||||
current = current.next;
|
current = current.next;
|
||||||
return {
|
return {
|
||||||
done: done,
|
done: false,
|
||||||
value: value
|
value: value
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user