forをforeachに置き換える


const people = ['Anna', 'Bella', 'Cris', 'David'];
const copy = [];

//for문
for (let i=0; i<people.length; i++){
	copy.push(people[i]);
}

//forEach문
people.forEach(function(person){
	copy.push(person);
});