From 272d65bd2d9514db9b5cac80b023a59f29193ed4 Mon Sep 17 00:00:00 2001 From: atomiks Date: Thu, 12 Apr 2018 15:20:50 +1000 Subject: [PATCH] Update is.md --- snippets/is.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/is.md b/snippets/is.md index 71c824930..7dc5dba30 100644 --- a/snippets/is.md +++ b/snippets/is.md @@ -2,7 +2,7 @@ Checks if the provided value is of the specified type. -Ensure the value is not `undefined` or `null` and compare the `constructor` property on the value with `type` to check if the provided value is of the specified `type`. +Ensure the value is not `undefined` or `null` using `Array.includes()`, and compare the `constructor` property on the value with `type` to check if the provided value is of the specified `type`. ```js const is = (type, val) => ![, null].includes(val) && val.constructor === type;