I recently noticed that when using array.prototype.map(), my callback function may accept a third argument which is the array I'm mapping. I wonder if there are any use cases for this argument because inside the callback function, the array can be accessed anyways.
If I access the array I'm mapping inside the callback function, why/when should I rather use the third argument instead of just accessing the array?
Even though both methods should work fine in every use case I can imagine, I'd like to know which is the recommended way to do it and why.