From c56a09f3187480332c4df3155bae52adada166fe Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Mon, 14 Oct 2013 23:48:24 -0700 Subject: [PATCH] Add doc note to `_.forEach` about array-like objects. [closes #339] [ci skip] --- lodash.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lodash.js b/lodash.js index fc4f9ad9d..e87d9bebe 100644 --- a/lodash.js +++ b/lodash.js @@ -3434,6 +3434,10 @@ * (value, index|key, collection). Callbacks may exit iteration early by * explicitly returning `false`. * + * Note: As with other "Collections" methods, objects with a `length` property + * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn` + * may be used for object iteration. + * * @static * @memberOf _ * @alias each