typeof
to check if a value is classified as a function primitive.const isFunction = val => typeof val === 'function';
isFunction('x'); // false
isFunction(x => x); // true
Subscribe to get resources directly to your inbox. You won't receive any spam! ✌️