repl.txt (725B)
1 2 {{alias}}( collection ) 3 Tests whether all elements in a collection are falsy. 4 5 The function immediately returns upon encountering a truthy value. 6 7 If provided an empty collection, the function returns `true`. 8 9 Parameters 10 ---------- 11 collection: Array|TypedArray|Object 12 Input collection over which to iterate. If provided an object, the 13 object must be array-like (excluding strings and functions). 14 15 Returns 16 ------- 17 bool: boolean 18 The function returns `true` if all elements are falsy; otherwise, the 19 function returns `false`. 20 21 Examples 22 -------- 23 > var arr = [ 0, 0, 0, 0, 0 ]; 24 > var bool = {{alias}}( arr ) 25 true 26 27 See Also 28 -------- 29