ga-wdi-boston / js-array-iteration-methods

JavaScript Array methods
Other
1 stars 160 forks source link

Don't call the array that you're passing to forEach 'array' #19

Closed raq929 closed 7 years ago

raq929 commented 7 years ago

It creates confusion, imho. Developers end up thinking that the parameter array in the implementation of forEach is the same as the variable array that you are passing to forEach.

raq929 commented 7 years ago

I recommend const testArray, or some such.