Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. function repeat(string,times) { var output = ""
  2. for(var i = 0; i < times; i++) { output += string }
  3. return output }
  4. repeat("Hello world!",2) // "Hello world!Hello world!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement