back to Overview

.call()

Calls all functions in the list.
Util module only.

Syntax Variants

list.call()
list.call(args)
list.call(fThis)
list.call(fThis, args)
_.call(list)
_.call(list, args)
_.call(list, fThis)
_.call(list, fThis, args)

Parameters

list
A list containing the functions to call. Can be an array, a Minified list or any other array-like structure with length property.
args (optional)
A list or array of arguments to pass to the functions.
fThis (optional)
If set, a value to pass as this. Please note that if you use a list as fThis, you must set args also to an (possibly empty) array.
(return value)
A list containing the return values of the called functions, or undefined for list items that were not functions.

Description

Calls all functions in the list.

call goes through all list items and, if they are functions, calls them with the specified arguments. Elements that are not functions will be ignored. The return values of the functions will be written into a list of the same size and order as original list. If a input list item is not a function, the corresponding value in the result list will be undefined.

Comments

comments powered by Disqus

back to Overview

Functions