[JavaScript] Elemente zu Array hinzufügen

eine bestimmte Anzahl Elemente

const oTestArray = [{ width: 200 }];
		
for (let i = 0; i < 5; i++) {
  oTestArray.push({ width: 100 });
}

console.log(oTestArray);

mehrere Elemente auf einmal

const oTestArray = [];
		
oTestArray.push("Udo", "Ede");

console.log(oTestArray);

Links