Created
September 28, 2011 11:31
-
-
Save hanksudo/1247722 to your computer and use it in GitHub Desktop.
A function reutrn repeat_words
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_word(str, n) { | |
var s = '' | |
for (i=0; i<n; i++) { | |
s += str; | |
} | |
return s; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment