-
Notifications
You must be signed in to change notification settings - Fork 0
Preparing to JS interview
Wasyl Gutnyk edited this page Jul 30, 2021
·
1 revision
question:
answer:
forEach
method doesnt used to create new array, it just iterates through the array and makes some modifications with element
map
returns the array element, you can iterate through array, make some changes to the each item of it and return new array. Remember, It doesnt mutate initial array.
sdfsdf