From 20387d5161f575396ecefb88d33c961934f8b9d4 Mon Sep 17 00:00:00 2001 From: Cristiano Aguzzi Date: Fri, 22 Sep 2023 09:46:21 +0200 Subject: [PATCH] docs(contributing): better explanation for checking for undefined and null --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f6500d13d..c40b30490 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -99,7 +99,7 @@ function(arg1: string | null | undefined) { ``` Instead of checking for both null and `undefined` values (`if (arg !== undefined && arg !== null)`) the preferred solution is to use `!=` or `==` operator. Interestingly in JavaScript -with `==`, `null` and `undefined` are only equal to each other. Example: +with `==`, `null` and `undefined` are equal to each other. Example: ```ts function(arg1: string | null | undefined) {