Array.prototype.do proposal

# Pranay Prakash (7 years ago)

I found the existence of a function like this in RxJS quite useful and I wish JavaScript had it too. What do you think?

pranaygp/proposal-array-prototype-do

# Reinis Ivanovs (7 years ago)

Array is just one of the collection types, and it probably shouldn't be extended if the others aren't. The previous opinion of TC39 has also been against extending the collection type prototypes in general, opting for generic iteration methods instead, but it's a complex issue and no one's tackled it properly yet.

# T.J. Crowder (7 years ago)

On Thu, Oct 5, 2017 at 2:18 AM, Pranay Prakash <pranay.gp at gmail.com> wrote:

I found the existence of a function like this in RxJS quite useful and I wish JavaScript had it too. What do you think?

pranaygp/proposal-array-prototype-do

This was just discussed: esdiscuss.org/topic/return-value-of-foreach

-- T.J. Crowder