_.isFunction(a) vs. typeof a === ‘function’? javascript

There is no reason not to use typeof.

Not only is it faster but the ECMAScript specification ensures that all functions have a type of “function” and that only functions can have a type of “function” :

enter image description here

This operator was specifically designed to get the type of a value, so why not use it ?

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)