how to access an array using a loop mdn code example Example: mdn foreach arr.forEach(callback(currentValue [, index [, array]])[, thisArg])