Looked around and could not find an answer for this one.
I am trying to reverse each word of a string without changing the order of the words...
this is the code I have:
function wordsReverser(string){
return string.split('').reverse().join('');
}
console.log(wordsReverser('New string, same results.'));
what I am getting for results is this: ".stluser emas ,gnirts weN"
I am looking for this: "weN gnirts... "
Here is a jsbin