728x90
The for ...in statement iterates over the enumerable properties of an object.
(enumerable : able to be counted by one-to-one correspondence with the set of all positive integers.)
The for ...of statement iterates over values that the iterable object defines to be iterated over.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of
for...of - JavaScript | MDN
The for...of statement creates a loop iterating over iterable objects, including: built-in String, Array, array-like objects (e.g., arguments or NodeList), TypedArray, Map, Set, and user-defined iterables. It invokes a custom iteration hook with statements
developer.mozilla.org
'개발관련 > front-end' 카테고리의 다른 글
javascript 이벤트 핸들러 종류 (0) | 2023.07.10 |
---|---|
DOM 은 API 이다. (0) | 2022.04.22 |
마우스 드래그 javascript (0) | 2022.04.14 |
JSTL quick reference 작성중, el tag, core tag, forEach (0) | 2022.04.14 |
margin auto 위아래 안될 때 (0) | 2021.11.29 |