The biggest drawback of the
forEach loop is that it doesn’t return anything useful.
If you want to get an array
doubleArr where each element is equal to the element
arr multiplied by two, then
forEach won’t help.
To get an array equal in length to the initial array but with modified elements, use the