Change wording in Iterators and Generators

I found the term "function constructors" to be confusing as the functions the section refers to are not constructors. I think "higher-order functions" or something similar would be more clear.

Thanks!
This commit is contained in:
Luke Westby
2015-04-03 21:13:50 -05:00
committed by Josh Perez
parent 22e3c89d04
commit bc5b0ee007

View File

@@ -767,7 +767,7 @@
## Iterators and Generators
- Don't use iterators. Prefer JavaScript's function constructors instead of loops like `for-of`.
- Don't use iterators. Prefer JavaScript's higher-order functions like `map()` and `reduce()` instead of loops like `for-of`.
> Why? This enforces our immutable rule. Dealing with pure functions that return values is easier to reason about than side-effects.