From 767d1e9a1bb5b784d6afca728ab58c3575802eb9 Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Mon, 18 Dec 2017 12:16:18 +0200 Subject: [PATCH] Update coalesce.md --- snippets/coalesce.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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(_))