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