Is performing a mapping operation without using returned value an antipattern? [closed]
Lets say I have a list and I want to add some values into it using a mapping function: const arr = [1, 2, 3, 4, 5]; const anotherArr = []; I do this using a functional approach: arr.map((item) => anotherArr.push(item)); Is this an antipattern / bad logic - that is, not using the mapping operation return value for anything? Are there any good resources on this? (I know this logic is silly and I can just copy the list - that is not the point of my question)
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.