Skip to content

Commit 419d5be

Browse files
authored
Merge pull request #333 from a-ogilvie/patch-1
Small changes for readability
2 parents f589734 + 1352092 commit 419d5be

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

1-js/05-data-types/06-iterable/article.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ for (let item of arrayLike) {}
188188
*/!*
189189
```
190190

191-
What they share in common -- both iterables and array-likes are usually *not arrays*, they don't have `push`, `pop` etc. That's rather inconvenient if we have such an object and want to work with it as with an array.
191+
What do they have in common? Both iterables and array-likes are usually *not arrays*, they don't have `push`, `pop` etc. That's rather inconvenient if we have such an object and want to work with it as with an array.
192192

193193
## Array.from
194194

@@ -295,8 +295,8 @@ Objects that can be used in `for..of` are called *iterable*.
295295
- String iterator knows about surrogate pairs.
296296

297297

298-
Objects that have indexed properties and `length` are called *array-like*. Such objects may also have other properties and methods, but lack built-in methods of arrays.
298+
Objects that have indexed properties and `length` are called *array-like*. Such objects may also have other properties and methods, but lack the built-in methods of arrays.
299299

300300
If we look inside the specification -- we'll see that most built-in methods assume that they work with iterables or array-likes instead of "real" arrays, because that's more abstract.
301301

302-
`Array.from(obj[, mapFn, thisArg])` makes a real `Array` of an iterable or array-like `obj`, and then we can use array methods on it. The optional arguments `mapFn` and `thisArg` allow to apply a function to each item.
302+
`Array.from(obj[, mapFn, thisArg])` makes a real `Array` of an iterable or array-like `obj`, and we can then use array methods on it. The optional arguments `mapFn` and `thisArg` allow us to apply a function to each item.

0 commit comments

Comments
 (0)