Quiz · Array methods · lesson 5 of 12Quiz — map, filter, reduce, forEachWhat do the array methods map, filter, reduce, and forEach each do?[A]map and filter change the original array in place and return nothing. reduce returns a new array with the running total after each step, one entry per element, and forEach returns a new array of the function's results, the same way map does.[B]Each of the four returns one value, never an array, so you cannot call another array method on the result. map returns the last element it changed, filter returns how many elements matched, reduce returns true if any element passed, and forEach returns the sum of what the function returned for each element.[C]map returns a new array of the same length made of what the function returned for each element. filter returns a new array of the elements for which the function returns a truthy value. reduce combines all elements into one value. forEach calls the function for each element and returns undefined.[D]map keeps only the elements for which the function returns a truthy value, so the array can get shorter. filter changes every element and keeps the length, reduce returns the first element that matches, and forEach returns a new array like map.Subscribe to take the courseThe course is free. Sign in with Telegram and subscribe to the channel to open every lesson.Continue with TelegramSign in another way← BackreduceNext →find, some and every