Skip to content

Commit

Permalink
Add in _.reverse -Lodash only
Browse files Browse the repository at this point in the history
  • Loading branch information
cht8687 committed Jan 28, 2016
1 parent 5bb75b9 commit 22c4bcf
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ You are welcome to contribute with more items provided below.
1. [_.keys](#_keys)
1. [_.size](#_size)
1. [_.isNaN](#_isnan)

1. [_.reverse](#_reverse) *Lodash only

## _.each

Expand Down Expand Up @@ -409,6 +409,27 @@ Checks if value is NaN.
--- | --- | --- | --- | --- |
✔ | ✔ | ✔ | ✔ | ✔ |

## _.reverse *Lodash only

Reverses array so that the first element becomes the last, the second element becomes the second to last, and so on.

```js
// Lodash
var array = [1, 2, 3];
console.log(_.reverse(array));
// output: [3, 2, 1]

// Native
var array = [1, 2, 3];
console.log(array.reverse());
// output: [3, 2, 1]
```
### Browser Support

![Chrome](https://raw.github.com/alrra/browser-logos/master/chrome/chrome_48x48.png) | ![Firefox](https://raw.github.com/alrra/browser-logos/master/firefox/firefox_48x48.png) | ![IE](https://raw.github.com/alrra/browser-logos/master/internet-explorer/internet-explorer_48x48.png) | ![Opera](https://raw.github.com/alrra/browser-logos/master/opera/opera_48x48.png) | ![Safari](https://raw.github.com/alrra/browser-logos/master/safari/safari_48x48.png)
--- | --- | --- | --- | --- |
1.0✔ | 1.0✔ | 5.5✔ | ✔ | ✔ |

## Reference

* [Mozilla Developer Network](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference)
Expand Down

0 comments on commit 22c4bcf

Please sign in to comment.