DEV Community

Discussion on: Solving "Mutations" / freeCodeCamp Algorithm Challenges

Collapse
 
ttatsf profile image
tatsuo fukuchi

Another way:

const mutation = ( [ first, second ] ) =>
  second
  .toLowerCase()
  .split('')
  .every( e => 
         first
         .toLowerCase()
         .includes(e)
  )