buit-in foreach javascript code example Example: foreach javascript arr.forEach(callback(currentValue [, index [, array]])[, thisArg]);