I'm from Aguascalientes, Mexico! now based on New York. Most of my experience is related to code websites and applications, using JavaScript stack-based.
myArray.reduce((acc,item)=>{// Filter if met some condition, and add the proccesed itemif(somelogic)acc.push(process.item)returnacc;},[]).forEach(item=>/*anything */)/* Compact should be */myArray.reduce((acc,item)=>(somelogic&&acc.push(process(item)),acc),[]).forEach(item=>/*anything */)
You can even use a simple reduce
Nice! Very cool utilization of reduce I like it.