From 064f673f4b2196a09914a7e9a14ba3c23534fdaf Mon Sep 17 00:00:00 2001 From: tjcrowder Date: Mon, 7 Sep 2009 14:56:01 +0100 Subject: [PATCH] doc: merged old docs for Enumerable#reject, used new example. --- src/lang/enumerable.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/lang/enumerable.js b/src/lang/enumerable.js index 2f7acb5..a39f2f6 100644 --- a/src/lang/enumerable.js +++ b/src/lang/enumerable.js @@ -458,8 +458,17 @@ var Enumerable = (function() { /** * Enumerable#reject(iterator[, context]) -> Array + * - iterator (Function): An iterator function to use to test the elements. + * - context (Object): An optional object to use as `this` within + * calls to the iterator. * - * Returns all the elements for which the iterator returned a "falsy" value. + * Returns all the elements for which the iterator returns a falsy value. + * For the opposite operation, see [[Enumerable#findAll]]. + * + * ### Example + * + * [1, "two", 3, "four", 5].reject(Object.isString); + * // -> [1, 3, 5] **/ function reject(iterator, context) { var results = [];