Skip to content

Commit

Permalink
Fixes jashkenas#968 -- warn about numeric length up top
Browse files Browse the repository at this point in the history
  • Loading branch information
jashkenas committed Feb 12, 2013
1 parent 75a7e2b commit 83b41f5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,15 @@ <h2 id="collections">Collection Functions (Arrays or Objects)</h2>
_.each({one : 1, two : 2, three : 3}, alert);
=&gt; alerts each number value in turn...</pre>

<p>
<i>
Note: Collection functions work on arrays, objects, and
array-like objects such as</i> <tt>arguments</tt>, <tt>NodeList</tt><i>
and similar. But it works by duck-typing, so avoid passing objects with
a numeric <tt>length</tt> property.
</i>
</p>

<p id="map">
<b class="header">map</b><code>_.map(list, iterator, [context])</code>
<span class="alias">Alias: <b>collect</b></span>
Expand Down

0 comments on commit 83b41f5

Please sign in to comment.