If you really want to golf your code, you could also replace forEach with map, since this will have the same effect except creating a new array that never gets used:
arr.map(console.log);
Misleading
Poor performance
Saves 4 letters
Worth 👍
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
If you really want to golf your code, you could also replace
forEach
withmap
, since this will have the same effect except creating a new array that never gets used:Worth 👍