Question: 5. Consider the following array: let nums = [11, 22, 33, 46, 75, 86, 97, 981; 1 Use filter then map array functions to filter

5. Consider the following array: let nums = [11, 22, 33, 46, 75, 86, 97, 981; 1 Use filter then map array functions to filter even numbers then square them. Assign the results to a variable named squaredEvenNums then display it. The output should be: squaredEven Nums: [484, 2116, 7396, 9604) Use the reduce array function to compute the of sums array. The output should be: Sum of array elements: 468 You must use arrow functions in this exercise. 6. Square and sum the elements of this array using arrow functions and in 1 line of code. Then find the average of the array. let nums = [25, 45, 55, 77, 88, 991; 7. Sort the in ascending, descending order (18,47,56,65,47,73,28,18] Note that you must use JavaScript features and capabilities such as arrow functions, array functions (.map, .reduce, .filter, .splice, .sort...) and spread operator
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
