0

I don't understand how the expression of return of following code works.

function reverse3(array) {
    return array.map((element, idx, arr) => arr[(arr.length - 1) - idx]);
}

This function gives reverse of array parsed to the function. But I actually don't understand and didn't get idea after googling for hours about how that statement in map() function works. Please give me explanation about for what those three variables stands and what that => operator does. THANKS in advance!!

0 Answers0