var myArray = [];
function pointsArray(totalPoints) {
for (i = 0; i < totalPoints; i++) {
myArray.push(1);
}
return myArray;
}
↧
Answer by isherwood for How to instantiate a javascript array with the same value
↧