all ( iterable: Array ) →{ Promise }
This method can be useful for aggregating the results of multiple promises.
Parameters
Name | Type | Description |
---|---|---|
iterable | Array |
Example
The Promise.all() method returns a single Promise that fulfills when all of the promises passed as an iterable have been fulfilled or when the iterable contains no promises or when the iterable contains promises that have been fulfilled and non-promises that have been returned. It rejects with the reason of the first promise that rejects, or with the error caught by the first argument if that argument has caught an error inside it using try/catch/throw blocks.bind ( thisArg: Object , args: Any) →{ Object }
The bind() method creates a new function that, when called, has its this keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function is called.
Parameters
Name | Type | Description |
---|---|---|
thisArg | Object | The value to be passed as the this parameter to the target function func when the bound function is called. The value is ignored if the bound function is constructed using the new operator. When using bind to create a function (supplied as a callback) inside a setTimeout, any primitive value passed as thisArg is converted to object. If no arguments are provided to bind, the this of the executing scope is treated as the thisArg for the new function. |
args | Any | Arguments to prepend to arguments provided to the bound function when invoking func. |
Returns
A copy of the given function with the specified this value, and initial arguments (if provided).
call ( thisArg: Any, args: Any) →{ Any }
The call() method calls a function with a given this value and arguments provided individually.
Parameters
Name | Type | Description |
---|---|---|
thisArg | Any | The value to use as this when calling func. |
args | Any | Arguments for the function |
Returns
The result of calling the function with the specified this value and arguments