MDN is my primary Javascript resource.
I often see a notation like ( currentValue[, index[, array]]) as in:
let new_array = arr.map(function callback( currentValue[, index[, array]]) {
// return element for new_array
}[, thisArg])
I'm surprised there's a square bracket in front of the comma. It looks like an invalid syntax to me.
I would highly appreciate it if somebody could give more information about this notation.