Skip to content

Instantly share code, notes, and snippets.

@theDreamer911
Created February 21, 2021 04:24
Show Gist options
  • Save theDreamer911/fcfbfe26929d0be8d173bafd7c483da0 to your computer and use it in GitHub Desktop.
Save theDreamer911/fcfbfe26929d0be8d173bafd7c483da0 to your computer and use it in GitHub Desktop.
function wordMesh(arr){
let r=""
for(let i=0;i<arr.length-1;i++){
let t=(arr[i]+" "+arr[i+1]).match(/(.+) \1/)
if(!t) return "failed to mesh"
r+=t[1]
}
return r
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment