Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function repeat(string,times) { var output = ""
- for(var i = 0; i < times; i++) { output += string }
- return output }
- repeat("Hello world!",2) // "Hello world!Hello world!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement