Skip to content

Instantly share code, notes, and snippets.

@goliatone
Created January 9, 2017 16:33
Show Gist options
  • Save goliatone/bf2e8e86f120ba40dd87bc6b19271707 to your computer and use it in GitHub Desktop.
Save goliatone/bf2e8e86f120ba40dd87bc6b19271707 to your computer and use it in GitHub Desktop.
repeat a character a number of times
function repeat(char, times){
return Array(times + 1).join(char);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment