JavaScript for...of Loop
JavaScript for...of Loop
The for...of statements is used to iterate loops over the values of any iterable. Whatever code is present inside of a block, will be executed once for each value.
Syntax:-
Its syntax is:-
for (x of iterable) {
code block to be executed
}
Further Explanation:-
Parameter | Description |
x | Required. The value of the next property is assigned to x for every iteration. |
iterable | Required. Anything that has iterable properties. |