diff --git a/Reverse each word of a string individually. #12 b/Reverse each word of a string individually. #12 new file mode 100644 index 0000000..6c32184 --- /dev/null +++ b/Reverse each word of a string individually. #12 @@ -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(""); +}