Skip to content

Commit c598888

Browse files
authored
Merge pull request #2 from atimidguy/atimidguy-patch-2
Atimidguy patch 2
2 parents a750d6f + a3c7eed commit c598888

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ arr.slice(start, end)
124124

125125
It returns a new array copying to it all items from index `start` to `end` (not including `end`). Both `start` and `end` can be negative, in that case position from array end is assumed.
126126

127-
It's similar to a string method `str.slice`, but instead of substringss it makes subarrays.
127+
It's similar to a string method `str.slice`, but instead of substrings it makes subarrays.
128128

129129
For instance:
130130

1-js/06-advanced-functions/06-function-object/article.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,8 @@ If the function is declared as a Function Expression (not in the main code flow)
347347

348348
Also, functions may carry additional properties. Many well-known JavaScript libraries make great use of this feature.
349349

350-
They create a "main" function and attach many other "helper" functions to it. For instance, the [jQuery](https://jquery.com) library creates a function named `$`. The [lodash](https://lodash.com) library creates a function `_`. And then adds `_.clone`, `_.keyBy` and other properties to it (see the [docs](https://lodash.com/docs) when you want learn more about them). Actually, they do it to lessen their pollution of the global space, so that a single library gives only one global variable. That reduces the possibility of naming conflicts.
350+
351+
They create a "main" function and attach many other "helper" functions to it. For instance, the [jQuery](https://jquery.com) library creates a function named `$`. The [lodash](https://lodash.com) library creates a function `_`, and then adds `_.clone`, `_.keyBy` and other properties to it (see the [docs](https://lodash.com/docs) when you want learn more about them). Actually, they do it to lessen their pollution of the global space, so that a single library gives only one global variable. That reduces the possibility of naming conflicts.
352+
351353

352354
So, a function can do a useful job by itself and also carry a bunch of other functionality in properties.

0 commit comments

Comments
 (0)