
Array.prototype.forEach() – Executes a callback for every element **without returning** a new array. Suitable for side‑effects.
๐ Syntax
array.forEach((element, index, array) => {
// side‑effect only
}, thisArg);
๐งช Example
['๐','๐','๐'].forEach((f,i) => console.log(i, f));
Comments
Post a Comment