words

jQuery consistency fail

jQuery.each( collection, callback(indexInArray, valueOfElement) )
jQuery.map( array, callback(elementOfArray, indexInArray) )

Now I know why I have to start a $.map and $.each always with


$.map( elements, function ( i, el) {
    console.log(i, el);
});

and switch if I fail..

http://api.jquery.com/jQuery.each/
http://api.jquery.com/jQuery.map/

Last updated: