When invoked, the function is provided three arguments:
value: object property value
key: object property
obj: the input object
To terminate iteration before visiting all properties, the provided function must explicitly return false.
The function determines the list of own enumerable properties before invoking the provided function. Hence, any modifications made to the input object after calling this function (such as adding and removing properties) will not affect the list of visited properties.
Invokes a function once for each own enumerable property of an object.
Notes
When invoked, the function is provided three arguments:
value
: object property valuekey
: object propertyobj
: the input objectTo terminate iteration before visiting all properties, the provided function must explicitly return
false
.The function determines the list of own enumerable properties before invoking the provided function. Hence, any modifications made to the input object after calling this function (such as adding and removing properties) will not affect the list of visited properties.
Iteration order is not guaranteed.