How to Use the JavaScript Map() Function to Transform Arrays...
In many cases, the array argument is not required and is not included as a parameter. Without the third argument, the inline function syntax is structured as follows: 1 const newArray = anArray.map(function(value, index) { /* function body */ }) ...