# Introduction In this lab, we will explore the `rearg` function in JavaScript, which allows us to rearrange the order of arguments passed to a function based on specified indexes. We will learn how to use the `Array.prototype.map()` method and spread operator to transform the arguments and invoke the original function with the rearranged arguments. By the end of this lab, you will have a good understanding of how to use the `rearg` function to manipulate function arguments in JavaScript.
Click the virtual machine below to start practicing