
array.forEach() – Executes the provided function once for each array element (no return value).
๐ Syntax
array.forEach((element, index, array) => {
// side‑effect only
}, thisArg);
๐งช Example
['๐','๐','๐'].forEach(fruit => console.log(fruit));
Comments
Post a Comment