Skip to content

Commit

Permalink
Create Reverse each word of a string individually.
Browse files Browse the repository at this point in the history
  • Loading branch information
misselliev authored Oct 25, 2018
1 parent c7f6ef7 commit d20246a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Reverse each word of a string individually. #12
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
function wordsReverser(string){
var arr = string.split("");
var output = [];
for(var i = arr.length - 1; i >= 0; i--){
output.push(arr[i]);
}
return output.join("");
}

0 comments on commit d20246a

Please sign in to comment.