In which condition will Object.prototype.toString.call(fn) === '[object Function]'
and typeof fn === 'function'
return different results?
I saw the function isCallable
on mdn (see line 4 - line 7):
var isCallable = function (fn) {
var toStr = Object.prototype.toString
return typeof fn === 'function' || toStr.call(fn) === '[object Function]'
}
I'm wondering the difference between these two tests, is one of them superfluous?