
const fruits = ['mango', 'papaya', 'pineapple', 'apple'];
// Iterate over fruits below
fruits.forEach(fruit =>
console.log(`I want to eat a ${fruit}.`))
'JAVASCRIPT' 카테고리의 다른 글
| The .findIndex() Method (0) | 2020.06.23 |
|---|---|
| The .filter() Method (0) | 2020.06.23 |
| 중첩 for 문 예시 (0) | 2020.06.09 |
| scope 예문 (0) | 2020.06.08 |
| es6 좀더 간결한 표현 (0) | 2020.06.08 |