
onst cities = ['Orlando', 'Dubai', 'Edinburgh', 'Chennai', 'Accra', 'Denver', 'Eskisehir', 'Medellin', 'Yokohama'];
const nums = [1, 50, 75, 200, 350, 525, 1000];
// Choose a method that will return undefined
cities.forEach(city => console.log('Have you visited ' + city + '?'));
forEach() 메서드는 주어진 함수를 배열 요소 각각에 대해 실행합니다.
'JAVASCRIPT' 카테고리의 다른 글
| .every () 예문 (0) | 2020.06.24 |
|---|---|
| some () 예문 (0) | 2020.06.24 |
| The .reduce() Method (0) | 2020.06.23 |
| The .findIndex() Method (0) | 2020.06.23 |
| The .filter() Method (0) | 2020.06.23 |