3 ms·
Not sure why someone would use map like that (which would unnecessarily generate and return a new array of 'corn's) instead of just forEach. I'd also probably
by ZeikJT 7y ago
Not sure why someone would use map like that (which would unnecessarily generate and return a new array of 'corn's) instead of just forEach.
I'd also probably recommend using Array.from instead of a spread (for clarity) but less concerned about that part.