function wordsReverser(string){ return string.split("").reverse().join("").split(" ").reverse().join(" ") } console.log(wordsReverser('New string, same results.'));