Skip to content

Instantly share code, notes, and snippets.

@doekman
Created January 16, 2016 19:08
Show Gist options
  • Save doekman/acd0e66415225ef11abb to your computer and use it in GitHub Desktop.
Save doekman/acd0e66415225ef11abb to your computer and use it in GitHub Desktop.
repeat one-liner
function repeat(str,num) {
return new Array(num+1).join(str);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment