Check if input is a function type variable - Node.js Data Type

Node.js examples for Data Type:Type Check

Description

Check if input is a function type variable

Demo Code


function isFunction(x) {
    return typeof x === 'function';
}
exports.isFunction = isFunction;/*w ww.  j a va 2s  .co m*/

Related Tutorials