Skip to content

Commit

Permalink
Merge pull request GitbookIO#73 from Joseworks/typo_section_7_2
Browse files Browse the repository at this point in the history
Small typos corrections.
  • Loading branch information
SamyPesse committed Nov 14, 2014
2 parents 77643d7 + 8a8942b commit d238369
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion functions/higher_order.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ map(double, [5,6,7]) // => [10, 12, 14]

The functions in the above example are simple. However, when passed as arguments to other functions, they can be composed in unforeseen ways to build more complex functions.

For example, if we notice that we use the invocations `map(add_2, ...)` and `map(double, ...)` very often in our code, we could decide we want to create two special-purpse list processing functions that have the desired operation baked into them. Using function composition, we could do this as follows:
For example, if we notice that we use the invocations `map(add_2, ...)` and `map(double, ...)` very often in our code, we could decide we want to create two special-purpose list processing functions that have the desired operation baked into them. Using function composition, we could do this as follows:

```javascript
process_add_2 = function(list) {
Expand Down
2 changes: 1 addition & 1 deletion objects/prototype.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var stringRepresentation = adult.toString();
// the variable has value of '[object Object]'
```

`toString` is an Object.prototype's property, which was inhereted. It has a value of a function, which returns a string representation of the object. If you want it to return a more meaningful representation, then you can override it. Simply add a new property to the adult object.
`toString` is an Object.prototype's property, which was inherited. It has a value of a function, which returns a string representation of the object. If you want it to return a more meaningful representation, then you can override it. Simply add a new property to the adult object.

```js
adult.toString = function(){
Expand Down

0 comments on commit d238369

Please sign in to comment.