8000 Fixed while condition · lovejavaee/javascript-patterns@9a3cf67 · GitHub 8000
[go: up one dir, main page]

Skip to content

Commit 9a3cf67

Browse files
author
Vitalii Fedorenko
committed
Fixed while condition
1 parent 1a18057 commit 9a3cf67

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

design-patterns/iterator.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212

1313
var element;
14-
while (element - agg.next()) {
14+
while (element = agg.next()) {
1515
// do something with the element
1616
console.log(element);
1717
}
@@ -68,4 +68,4 @@
6868
// http://shop.oreilly.com/product/9780596806767.do?sortby=publicationDate
6969
</script>
7070
</body>
71-
</html>
71+
</html>

0 commit comments

Comments
 (0)
0