Loading lesson path
Concept visual
Start at both ends
Array iteration methods operate on every array item.
Array Spread (...) Array Rest (...)
method calls a function (a callback function) once for each array element.
const numbers = [45, 4, 9, 16, 25];
let txt = "";
numbers.forEach(myFunction);
function myFunction(value, index, array) {
txt += value + "<br>";
}Note that the function takes 3 arguments: