I want to run element in for loop for many times but how?
let Array =[ "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "5", "5", "5", "5", "5", "5", "5", "10", "10", "10", "10", "2roll", "2roll", "2roll", "chance", "chance", "4roll", ] var t = 0; var i = 10; const randomIndex = Math.floor(Math.random() * Array.length); const randomElem = Array[randomIndex]; console.log(randomElem); for (var element of randomElem ) { if(element ===1) { t = t + i; console.log(element ) console.log(t) console.log(i) } else { t = t - i; i = i * 2; console.log(element ) console.log(t) console.log(i) } } I want multiple outputs .. at least 50