Returns first non-nil (not undefined, not null) value from given arguments.
coalesce(null, undefined, void 0, 5); // returns 5
coalesce(4, null, 6, undefined); // returns 4
coalesce(undefined); // returns null
coalesce(); // returns null
first non-nil value or null
Rest
values
Generated using TypeDoc
Returns first non-nil (not undefined, not null) value from given arguments.
Example
Example
Example
Example
Returns
first non-nil value or null