From 2277740036b1412f4814c9086ca695bf51aa814b 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 ```