The forEach method executes a provided function once for each array element.
forEach
let arr = ["one", "two", "three"]; arr.forEach(e => console.log(e)); // Result: // one // two // three
The forEach() method is not executed for the empty statment.
forEach()
Last updated 3 years ago