Created
January 9, 2017 16:33
-
-
Save goliatone/bf2e8e86f120ba40dd87bc6b19271707 to your computer and use it in GitHub Desktop.
repeat a character a number of times
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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