Simplify the test that checks the index is passed into map's callback function as the second parameter.