References
Array.forEach()
Leírás
A forEach
metódust egy függvény végrehajtására használják a tömb minden eleméhez.
Szintaxis
forEach(callbackFn)
forEach(callbackFn, thisArg)
Példa
const array1 = ['a', 'b', 'c']
array1.forEach((element) => console.log(element))
// Expected output: "a"
// Expected output: "b"
// Expected output: "c"