Skip to content

Instantly share code, notes, and snippets.

@jluismm2311
Created September 8, 2015 22:38
Show Gist options
  • Save jluismm2311/2d37d210ce6e3fcc4774 to your computer and use it in GitHub Desktop.
Save jluismm2311/2d37d210ce6e3fcc4774 to your computer and use it in GitHub Desktop.
Polycarpus works as a DJ in the best Berland nightclub, and he often uses dubstep music in his performance. Recently, he has decided to take a couple of old songs and make dubstep remixes from them. Let's assume that a song consists of some number of words. To make the dubstep remix of this song, Polycarpus inserts a certain number of words "WUB…
function songDecoder(song){
return song.replace(/(WUB)+/g, " ").trim();
}
@Nyambura254
Copy link

return song.replace(/(WUB)+/g, " ").trim();
//this works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment