.map() argument ordering should be switched
$.map(fooArray, callback) passes arguments into the callback with the correct ordering: (value, index)
$(".foo").map(callback) passes arguments into the callback with the wrong ordering: (index, value)
I believe the original reason why the second one passes index first is because it is expected that the developer will just use "this" to access the element.
Now that es6 lamda style functionals are being used more and more, "this" is no longer an option. Code such as the code below doesn't work because the arrow functions don't populate the "this" context.
- $(".foo").map(()=>$(this).val())
It just bugs me that there isn't a more elegant way to do a Jquery map() with arrow functions.