Javascript examples for Function:Function Definition
Comparing 2 functions
<html> <head></head> <body> <script> function testFn(name) {//from ww w . j av a2s. com var self = this; } testFn.prototype.compareFn = function() { console.info(name); }; var fn1 = new testFn('fn1'); var fn2 = new testFn('fn2'); console.log(fn1.compareFn == fn2.compareFn); </script> </body> </html>