About 51 results
Open links in new tab
  1. Repeat a string in JavaScript a number of times - Stack Overflow

    Array(11).join("a") // create string with 10 a's: "aaaaaaaaaa" (Note that an array of length 11 gets you only 10 "a"s, since Array.join puts the argument between the array elements.) Simon also points out …

  2. Repeat String - Javascript - Stack Overflow

    To repeat a string in a specified number of times, we can use the built-in repeat() method in JavaScript. Here is an example that repeats the following string for 4 times:

  3. How can I repeat strings in JavaScript? - Stack Overflow

    Apr 3, 2013 · Closed 12 years ago. In JavaScript, how would I create a string of repeating strings x number of times:

  4. Create an array with same element repeated multiple times

    May 17, 2017 · @AlfonsoVergara: In Javascript, String is a primitive (value-semantic) type; there's no way to get two strings to reference the same data (because strings aren't references in Javascript; …

  5. Javascript repeat a function x amount of times - Stack Overflow

    I'm trying to develop a function that repeats a function x amount of times, just once, not based on settimerinterval or settimeout or anything based on time. I don't want to use a while/for loop

  6. javascript - How to 'repeat' an array n times - Stack Overflow

    Feb 28, 2019 · 19 This question already has answers here: Repeat an array with multiple elements multiple times in JavaScript (8 answers)

  7. javascript - How do I repeat a string a given number of times without ...

    Repeat a given string str (first argument) for num times (second argument). Return an empty string if num is not a positive number. This is what I tried. Why does it not work? function

  8. Best way in javascript to repeatedly repeat a function?

    Apr 25, 2014 · So basically, I have to repeat the 100 evolution steps 3 times with unique operations to be done in between, before it all starts again from the beginning.

  9. javascript - Calling a function every 60 seconds - Stack Overflow

    Oct 27, 2017 · setTimeout(function, 60000); But what if I would like to launch the function multiple times? Every time a time interval passes, I would like to execute the function (every 60 seconds, let's say).

  10. javascript - Repeat code every 4 seconds - Stack Overflow

    Jun 19, 2011 · Repeat code every 4 seconds Asked 14 years, 7 months ago Modified 4 years ago Viewed 60k times