Skip to content

Instantly share code, notes, and snippets.

@Woodsphreaker
Created June 6, 2017 17:41
Show Gist options
  • Save Woodsphreaker/b7713a88aeab756d87cfc39ea3ae1057 to your computer and use it in GitHub Desktop.
Save Woodsphreaker/b7713a88aeab756d87cfc39ea3ae1057 to your computer and use it in GitHub Desktop.
mergeStrings
const solve = (str1) => (str2) => (str1 + str2).split('').reduce((acc, cur, i) => acc.concat(str1.slice(i, i + 1) , str2.slice(i , i + 1)), []).join('')
console.log(solve('Carlo')('Enrico'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment