DEV Community

loading...

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

Collapse
willsmart profile image
willsmart • Edited

JS quickie

theString => theString.split(' ').map(
  word => word.length >= 5 ?
    [...word].reverse().join('')
    : word
).join(' ')