Let\'s say I\'m given an array. The length of this array is 3, and has 3 elements:
var array = [\'1\',\'2\',\'3\'];
Eventually I will need
if you are inside a loop you can verify the current loop index with the array length and then multiply it's content.
let arr = [1, 2, 3];
if(currentIndex > arr.length){
//if your using a loop, make sure to keep arr at a level that it won't reset each loop
arr.push(...arr);
}
Full Example: https://jsfiddle.net/5k28yq0L/