Introduction
In this lab, we will explore the concept of mapping and reducing arrays in JavaScript. Specifically, we will learn how to use the averageBy()
function to calculate the average of an array after mapping each element to a value using a provided function. Through hands-on exercises and examples, we will gain a deeper understanding of these powerful array methods and how they can be used to streamline our code.