Skip to content

Commit 1cf2128

Browse files
authored
Merge pull request #53 from Yofri/master
another typo
2 parents 1ad6eb6 + ab7cd2d commit 1cf2128

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

1-js/04-object-basics/02-garbage-collection/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ Then their references are marked:
175175

176176
![](garbage-collection-3.png)
177177

178-
...And their refences, while possible:
178+
...And their references, while possible:
179179

180180
![](garbage-collection-4.png)
181181

1-js/05-data-types/04-array/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ alert( [1] + 1 ); // "11"
421421
alert( [1,2] + 1 ); // "1,21"
422422
```
423423

424-
Arrays do not have `Symbol.toPrimitive`, neither a viable `valueOf`, they implement only `toString` conversion, so here `[]` becomes an empty string, `[1]` becomes `"1"` and `[1,2]` becomes `"1,2".
424+
Arrays do not have `Symbol.toPrimitive`, neither a viable `valueOf`, they implement only `toString` conversion, so here `[]` becomes an empty string, `[1]` becomes `"1"` and `[1,2]` becomes `"1,2"`.
425425

426426
When the binary plus `"+"` operator adds something to a string, it converts it to a string as well, so the next step looks like this:
427427

1-js/05-data-types/05-array-methods/article.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ alert( arr ); // "I", "study", "complex", "language", "JavaScript"
100100
```
101101

102102
````smart header="Negative indexes allowed"
103-
Here and in other array methods, negative indexes are allowed. The specify the position from the end of the array, like here:
103+
Here and in other array methods, negative indexes are allowed. They specify the position from the end of the array, like here:
104104
105105
```js run
106106
let arr = [1, 2, 5]
@@ -382,7 +382,7 @@ alert(arr); // *!*1, 2, 15*/!*
382382
383383
Now it works as intended.
384384
385-
Let's step aside and thing what's happening. The `arr` can be array of anything, right? It may contain numbers or strings or html elements or whatever. We have a set of *something*. To sort it, we need an *ordering function* that knows how to compare its elements. The default is a string order.
385+
Let's step aside and think what's happening. The `arr` can be array of anything, right? It may contain numbers or strings or html elements or whatever. We have a set of *something*. To sort it, we need an *ordering function* that knows how to compare its elements. The default is a string order.
386386
387387
The `arr.sort(fn)` method has a built-in implementation of sorting algorithm. We don't need to care how it exactly works (an optimized [quicksort](https://en.wikipedia.org/wiki/Quicksort) most of the time). It will walk the array, compare its elements using the provided function and reorder them, all we need is to provide the `fn` which does the comparison.
388388

0 commit comments

Comments
 (0)