Course: Fall 2023 - WEBD 164 (41934)

1. **Basic Array Operations:** - Create an array containing the names of your favorite fruits. - Add a new fruit to the end of the array. - Remove the first fruit from the array. - Check if 'banana' is in the array. **Question 1: Basic Array Operations** 2. **Array Iteration:** - Use a `for` loop to print each element of an array. - Use the `forEach` method to do the same. - Use the `map` method to create a new array containing the lengths of each element in the original array. 3. **Array Filtering:** - Given an array of numbers, filter out all even numbers. - Given an array of strings, filter out all strings that contain the letter 'a'. **Question 3: Array Filtering** 4. **Array Manipulation:** - Given two arrays, merge them into a single array. - Given an array of numbers, find the sum of all the elements. - Given an array of strings, concatenate them into a single string. **Question 4: Array Manipulation** 5. **Array Sorting and Searching:** - Sort an array of numbers in ascending order. - Sort an array of strings in alphabetical order. - Find the index of a specific element in an array. **Question 5: Array Sorting and Searching** 6. **Array Slicing and Splicing:** - Create a new array by extracting a portion of an existing array. - Remove elements from an array using the `splice` method. - Insert elements into an array using the `splice` method. **Question 1: Create a new array by extracting a portion of an existing array.** **Question 2: Remove elements from an array using the `splice` method.** **Question 3: Insert elements into an array using the `splice` method.** 7. **Array Transformation:** - Given an array of numbers, square each element. - Given an array of strings, convert them to uppercase. - Given an array of objects, extract a specific property from each object and create a new array with those values. **Question 7: Array Transformation** 8. **Array Methods:** - Use the `reduce` method to find the maximum value in an array of numbers. - Use the `every` method to check if all elements in an array are greater than 10. - Use the `some` method to check if any element in an array is even. **Question : Using the `reduce` method to find the maximum value in an array of numbers.** **Question 2: Using the `every` method to check if all elements in an array are greater than 10.** **Question 3: Using the `some` method to check if any element in an array is even.** These answers demonstrate how to use the `reduce`, `every`, and `some` methods to perform various tasks with arrays in JavaScript. 9. **Array Deconstruction:** - Deconstruct an array into individual variables. - Swap the values of two variables using array deconstruction. **Question 9: Array Deconstruction** 10. **Multidimensional Arrays:** - Create a two-dimensional array (matrix) and perform operations like finding the sum of all elements, transposing the matrix, etc. **Question 10: Multidimensional Arrays**