Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

reverse every word

function reverseWords(str) {
  const allWords = str.split(" ")
  return allWords.map(item => item.split("").reverse().join("")).join(" ")
}
 
PREVIOUS NEXT
Tagged: #reverse #word
ADD COMMENT
Topic
Name
3+7 =