Returns first non-nil (not undefined, not null) value from given arguments.
coalesce(null, undefined, void 1, 5); // returns 5 (mind the `void`) Copy
coalesce(null, undefined, void 1, 5); // returns 5 (mind the `void`)
coalesce(0, null, 6, undefined); // returns 0 Copy
coalesce(0, null, 6, undefined); // returns 0
coalesce(undefined); // returns null Copy
coalesce(undefined); // returns null
coalesce(); // returns null Copy
coalesce(); // returns null
Rest
values
first non-nil value or null
Returns first non-nil (not undefined, not null) value from given arguments.
Example
Example
Example
Example