jQuery.map not consistent with Mozilla spec
jQuery.map not consistent with Mozilla spec
Why this inconsistency?
jQuery.map([-1,0,1], function(e) {
return e == -1 ? null : e;
});
returns: [0, 1]
[-1,0,1].map(function(e) {
return e == -1 ? null : e
});
returns: [null, 0, 1]
https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map
Topic Participants
les.szklanny
John Resig