Using IsCallable Operation?

David-Sarah Hopwood david-sarah at
Fri Jun 5 20:27:08 PDT 2009

Mark S. Miller wrote:
> On Fri, Jun 5, 2009 at 1:39 PM, Allen Wirfs-Brock
> <Allen.Wirfs-Brock at> wrote:
>> Not in ES5.  Generally checking that typeof x === 'function' is a close approximation.
>> ES5 (11.4.3) requires that  both native (ie, pure actual ECMAScript objects) and host
>> objects that implement [[Call]] produce "function" when typeof is applied to them.
>> This is a change from ES3 that did not impose this requirement upon host object objects.
> Why is this an approximation? In ES5, how can
>     typeof x === 'function'
> differ from testing whether something is callable?


David-Sarah Hopwood  ⚥

More information about the es5-discuss mailing list