How does the forEach() method differ from a for statement?
forEach()
for
for loops can be nested; whereas forEach loops cannot.
forEach can be used only with strings, whereas for can be used with additional data types.
forEach can be used only with an array, whereas for can be used with additional data types.
forEach allows you to specify your own iterator, whereas for does not.