Why is map()
used instead of forEach()
in the src/index.ts
?
#190
Answered
by
developit
nikolausliu
asked this question in
Q&A
-
see this line: src/index.ts L108 @developit The above code is only used to traverse and does not care about the return value,but using I guess it's to reduce code size. Is there any deeper reason? |
Beta Was this translation helpful? Give feedback.
Answered by
developit
Nov 30, 2023
Replies: 2 comments 3 replies
-
This is done to reduce file size. "map" is shorter than "forEach". |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
nikolausliu
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is done to reduce file size. "map" is shorter than "forEach".