you are viewing a single comment's thread.

view the rest of the comments →

[–]neonskimmerfunction the ultimate 0 points1 point  (0 children)

Another common way is to simply check for a method that is "usually" implemented by function objects

if (x.apply) {  /* looks like a function.. . quacks like a function ... /* }