Calls f for each value in a collection. If all calls return true this return
true this returns true. If any returns false this returns false at this point
and does not continue to check the remaining values.
The function to call for every
value. This function takes 3 arguments (the value, the key or
undefined if the collection has no notion of keys, and the collection)
and should return a boolean.
opt_obj: T=
The object to be used as the value of 'this'
within f.
The function to call for every
value. This function takes
3 arguments (the value, the key or undefined if the collection has no
notion of keys, and the collection) and should return a Boolean. If the
return value is true the value is added to the result collection. If it
is false the value is not included.
opt_obj: T=
The object to be used as the value of 'this'
within f.
Returns
A new collection where the passed values are
present. If col is a key-less collection an array is returned. If col
has keys and values a plain old JS object is returned.
Calls a function for each value in a collection. The function takes
three arguments; the value, the key and the collection.
NOTE: This will be deprecated soon! Please use a more specific method if
possible, e.g. goog.array.forEach, goog.object.forEach, etc.
Parameters
col: S
The collection-like object.
f: function(this: T, ?, ?, S): ?
The function to call for every value.
This function takes
3 arguments (the value, the key or undefined if the collection has no
notion of keys, and the collection) and the return value is irrelevant.
opt_obj: T=
The object to be used as the value of 'this'
within f.
Calls a function for every value in the collection and adds the result into a
new collection (defaults to creating a new Array).
Parameters
col: S
The collection-like object.
f: function(this: T, ?, ?, S): V
The function to call for every value.
This function takes 3 arguments (the value, the key or undefined if the
collection has no notion of keys, and the collection) and should return
something. The result will be used as the value in the new collection.
opt_obj: T=
The object to be used as the value of 'this'
within f.
Returns
A new collection with the new values. If
col is a key-less collection an array is returned. If col has keys and
values a plain old JS object is returned.
Calls f for each value in a collection. If any call returns true this returns
true (without checking the rest). If all returns false this returns false.
The function to call for every
value. This function takes 3 arguments (the value, the key or undefined
if the collection has no notion of keys, and the collection) and should
return a boolean.
opt_obj: T=
The object to be used as the value of 'this'
within f.