Java Script Quiz8 1. Which of the following is an example of using the map() function? let newArray = oldArray.filter(item => item > 5); let newArray = oldArray.map(item => item * 2); let newArray = oldArray.reduce((acc, curr) => acc + curr); 2. What is the syntax of an arrow function with a single parameter? (param) => expression param => expression function(param) {expression} 3. Which of the following is a higher-order function in JavaScript? map() filter() Both 4. How can you define a named arrow function or anonymous function? (name) => expression function name() {expression} function(name) => {expression} 5. Which of the following is an example of using the filter() function? let newArray = oldArray.filter(item => item > 5); let newArray = oldArray.map(item => item * 2); let newArray = oldArray.reduce((acc, curr) => acc + curr); 6. What is an arrow function in JavaScript? A function that has a name and a parameter A function that uses the => symbol A function that uses the function keyword 7. What is the purpose of the filter() function? To iterate over an array and filter out certain elements. To iterate over an array and apply a function to each element, returning a new array. To iterate over an array and sort its elements. 8. Can arrow functions have a body with multiple statements? Yes, they can No, they can’t It depends on the number of parameters 9. What is the purpose of the map() function? To iterate over an array and filter out certain elements. To iterate over an array and apply a function to each element, returning a new array. To iterate over an array and sort its elements. 10. What does the filter() function return? An array of the same size as the original array. An array of a different size than the original array. An object. Loading … Question 1 of 10