Loop (for each) over an array in JavaScript - Stack Overflow
https://stackoverflow.com/questions/9329446/loop-for-each-over-an-array-in-javascript
Web ResultFeb 17, 2012 · const a = ["a", "b", "c"]; a.forEach((element) => {. console.log(element); }); forEach accepts a callback function and, optionally, a value to use as this when calling that callback (not used above). The callback is called for each element in the array, in order, skipping non-existent elements in sparse arrays.
DA: 35 PA: 49 MOZ Rank: 24