We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7d89a25 commit bc0e527Copy full SHA for bc0e527
es6/es6-features.js
@@ -128,3 +128,15 @@ console.log(title);
128
console.log(symbol3.toString());
129
130
console.log(Symbol('foo') === Symbol('foo'));
131
+
132
133
+// 11. Iterator
134
135
+/** The iterable protocol allows JavaScript objects to define or customize their iteration behavior. **/
136
137
+ var title = 'ES6';
138
+ var iterateIt = title[Symbol.iterator]();
139
140
+ console.log(iterateIt.next().value); //output: E
141
+ console.log(iterateIt.next().value); //output: S
142
+ console.log(iterateIt.next().value); //output: 6
0 commit comments