반복문 for...of 문
개요
- 반복가능한 객체(
Array, Map, Set, String, TypeArray, Object 등)에 대해 반복하여 각 개별 속성값들을 탐색합니다.
사용 예시
const arr = ['a', 'b', 'c', 'd'];
for (const el of arr) {
console.log(el);
}
// expected output: "a"
// expected output: "b"
// expected output: "c"