How does the forEach() method differ from a for statement?
forEach()
for
forEach allows you to specify your own iterator, whereas for does not.
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.
for loops can be nested; whereas forEach loops cannot.