A function that accepts up to two arguments, the key name and the current value of the property represented by the key.
Optional
thisArg: any[Optional] An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, null or undefined the object will be used as the this value.
Calls the provided
callbackFn
function once for each key in an object. This is equivelent toarrForEach(Object.keys(theObject), callbackFn)
or if not using the array helperObject.keys(theObject).forEach(callbackFn)
except that this helper avoid creating a temporary of the object keys before iterating over them and like thearrForEach
helper you CAN stop or break the iteration by returning -1 from thecallbackFn
function.