Last active
August 20, 2017 11:57
-
-
Save harmenjanssen/b91c394dd26a06c5192e68e5be321da8 to your computer and use it in GitHub Desktop.
Recursive reverse function.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const reverse = ([head, ...rest]) => | |
| !head ? [] : reverse([...rest]).concat([head]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment