DEV Community

loading...

Discussion on: Daily Coding Puzzles - Nov 11th - Nov 16th

Collapse
arnemahl profile image
Arne Mæhlum

This is a fun way of doing it, though it might be a bit confusing at first glance 😂

const format_words = words =>
  words
    .filter(Boolean)
    .join(', ')
    .split('').reverse().join('')
    .replace(' ,', ' dna ')
    .split('').reverse().join('')