DEV Community

Discussion on: Improve your JavaScript code with these...

Collapse
 
decpk profile image
Praveen kumar

They implicitly return a new array. This is not true for all the methods that you have mentioned. Only map, filter will return brand new array. But reduce you can get a single value, It can be an array also. But some and every returns boolean value.