Modify ↓
Ticket #2486 (closed bug: fixed)
jQuery.map() string as callback parameter is broken
| Reported by: | flexer | Owned by: | |
|---|---|---|---|
| Priority: | critical | Milestone: | 1.2.4 |
| Component: | core | Version: | 1.2.3 |
| Keywords: | map | Cc: | |
| Blocking: | Blocked by: |
Description
If the argument is a string, it is treated as a short "lambda-form" function, with "a" representing the list item. For example, "a * a" may be passed instead of "function(a){ return a * a; }".
This is broken even in the docs Demo: http://docs.jquery.com/Utilities/jQuery.map
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

Thanks for pointing that out. The demo has been fixed.
For more information about why this feature was removed see #2402.