JavaScript for...in Loop
JavaScript for...in Loop
The for...in statements is used to iterate the loops over the properties of an object. Whatever code is present inside of a block, will be executed once for each property.
Syntax:-
Its syntax is:-
for (x in object) {
// code block to be executed
}
Further Explanation:-
Parameter | Description |
x | Required. A variable to iterate over the properties. |
object | Required. The object to be iterated |