From ead337acd96d2753ce5e4a694e1bbd132fd588b5 Mon Sep 17 00:00:00 2001 From: atomiks Date: Thu, 4 Jan 2018 08:12:04 +1100 Subject: [PATCH] Update isFunction.md --- snippets/isFunction.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/snippets/isFunction.md b/snippets/isFunction.md index 5f0335225..e507bb9e5 100644 --- a/snippets/isFunction.md +++ b/snippets/isFunction.md @@ -5,10 +5,11 @@ Checks if the given argument is a function. Use `typeof` to check if a value is classified as a function primitive. ```js -const isFunction = val => val && typeof val === 'function'; +const isFunction = val => typeof val === 'function'; ``` ```js +isFunction(null); // false isFunction('x'); // false isFunction(x => x); // true ```