-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathrepl.txt
More file actions
29 lines (21 loc) · 732 Bytes
/
repl.txt
File metadata and controls
29 lines (21 loc) · 732 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{{alias}}( collection )
Tests whether at least one element in a collection is truthy.
The function immediately returns upon encountering a truthy value.
If provided an empty collection, the function returns `false`.
Parameters
----------
collection: Array|TypedArray|Object
Input collection over which to iterate. If provided an object, the
object must be array-like (excluding strings and functions).
Returns
-------
bool: boolean
The function returns `true` if an element is truthy; otherwise, the
function returns `false`.
Examples
--------
> var arr = [ 0, 0, 0, 0, 1 ];
> var bool = {{alias}}( arr )
true
See Also
--------