diff --git a/snippets/coalesce.md b/snippets/coalesce.md index c8a59d5e0..22271dc68 100644 --- a/snippets/coalesce.md +++ b/snippets/coalesce.md @@ -1,6 +1,8 @@ -### Coalesce a set of arguments +### coalesce -Use `find()` to return the first non null/undefined argument. +Returns the first non-null/undefined argument. + +Use `Array.find()` to return the first non `null`/`undefined` argument. ```js const coalesce = (...args) => args.find(_ => ![undefined, null].includes(_))