node js iterate array of objects code example Example: foreach javascript arr.forEach(callback(currentValue [, index [, array]])[, thisArg]);