The answers from this question says to use this to check if function is defined:
typeof yourFunction === 'function'
But I've tried this on a non-standard function link(). And actually this returned false. The function is available on every browser I've tried - IE, Chrome, Opera, FireFox.
typeof String.link === 'function' // false
typeof String.link() === 'function' // Uncaught error ...
Then somewhere I find:
typeof String.prototype.link === 'function' //true
which actually returns true. What is the difference and why the first one fails?