Skip to content

Commit

Permalink
Merge pull request #1 from misselliev/misselliev-patch-1
Browse files Browse the repository at this point in the history
Create Reverse each word of a string individually.
  • Loading branch information
misselliev authored Oct 25, 2018
2 parents c7f6ef7 + d20246a commit d9f31ce
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 d9f31ce

Please sign in to comment.