DEV Community

Discussion on: Daily Challenge #15 - Stop gninnipS My sdroW!

Collapse
 
oryanmoshe profile image
Oryan Moshe
const spinner = sentence =>
  sentence.split(' ')
    .map(word =>
      word.length > 4 ?
        word.split('').reverse().join('') :
        word
      )
    .join(' ')