for badge #698
for badge
#698
-
What is the difference between map(), forEach(), and filter() in JavaScript? |
Beta Was this translation helpful? Give feedback.
Answered by
JohnnelBaylen
Mar 23, 2025
Replies: 1 comment
-
map(): Returns a new array with transformed elements. forEach(): Iterates over an array but does not return anything. filter(): Returns a new array with elements that match a condition. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Dem0-Test
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
map(): Returns a new array with transformed elements.
forEach(): Iterates over an array but does not return anything.
filter(): Returns a new array with elements that match a condition.