Skip to content

Commit b6897b4

Browse files
author
Victor Homyakov
committed
Wrong PDoc for Array#some and Array#every
1 parent ecacc02 commit b6897b4

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/prototype/lang/array.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -647,16 +647,15 @@ Array.from = $A;
647647
}
648648

649649
/**
650-
* Array#some([iterator = Prototype.K[, context]]) -> Array
650+
* Array#some([iterator = Prototype.K[, context]]) -> Boolean
651651
* - iterator (Function): An optional function to use to evaluate each
652652
* element in the enumeration; the function should return the value to
653653
* test. If this is not provided, the element itself is tested.
654654
* - context (Object): An optional object to use as `this` within
655655
* calls to the iterator.
656656
*
657-
* Returns the result of applying `iterator` to each item in the array. If
658-
* no iterator is provided, the elements are simply copied to the returned
659-
* array.
657+
* Determines whether at least one element is truthy (boolean-equivalent to
658+
* `true`), either directly or through computation by the provided iterator.
660659
*
661660
* `Array#some` acts as an ECMAScript 5 [polyfill](http://remysharp.com/2010/10/08/what-is-a-polyfill/).
662661
* It is only defined if not already present in the user's browser, and it
@@ -692,7 +691,7 @@ Array.from = $A;
692691
* - context (Object): An optional object to use as `this` within
693692
* calls to the iterator.
694693
*
695-
* Determines whether at least one element is truthy (boolean-equivalent to
694+
* Determines whether all elements are truthy (boolean-equivalent to
696695
* `true`), either directly or through computation by the provided iterator.
697696
*
698697
* `Array#every` acts as an ECMAScript 5 [polyfill](http://remysharp.com/2010/10/08/what-is-a-polyfill/).

0 commit comments

Comments
 (0)