# Introduction In this lab, we will explore the `indexBy` function in JavaScript, which creates an object from an array based on a provided function. The purpose of this lab is to help you understand how to use `Array.prototype.reduce()` and how to apply a function to each value of an array to produce a key-value pair. By the end of this lab, you will be able to use `indexBy` to map values of an array to keys and create a new object.
Click the virtual machine below to start practicing