Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const reverse = ([first, second, ...rest]) =>
- !second ? [first] :
- !rest.length ? [second, first] :
- reverse([second, ...rest]).concat([first]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement