diff --git a/README.md b/README.md index 5777cbc88..b47ab9fce 100644 --- a/README.md +++ b/README.md @@ -946,7 +946,7 @@ const getType = v => Use `Array.isArray()` to check if a value is classified as an array. ```js -const isArray = val => val && Array.isArray(val); +const isArray = val => !!val && Array.isArray(val); // isArray(null) -> false // isArray([1]) -> true ```