DEV Community

Discussion on: 20 Killer JavaScript One Liners ☝️

Collapse
 
jonrandy profile image
Jon Randy 🎖️ • Edited

I made no claim to it being faster, but in this case the reduce method is almost twice as fast - jsbench.me/3tkttupth4/1 - at least on Chrome. On Firefox though, the situation is reversed. Different JS engines, different optimisations I guess