Map array with empty argument

I want to map array and get indexes in return (currentValue is not needed). I want to avoid using unused arguments, so is there better way to do this:

 array.map((el, index) => { // el is not used anywhere
          return (
          <div>X</div>
          );
        })

Answer

If your want to use Array.map you can use _ as your value, this way you telling other developers that you don’t plan to use that value. like:

someArray.map((_, index) => { /* your code */ })

Or your can simply use for loop.