Skip to content

Commit 006e80a

Browse files
committed
reversestring
1 parent 76a254d commit 006e80a

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed
File renamed without changes.
File renamed without changes.

reversestring3.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// Reverse string with reduce helper function
2+
3+
function reverse(str){
4+
return str.split('').reduce((rev, char) => char + rev
5+
, '');
6+
}

0 commit comments

Comments
 (0)