I need to detect whether two anonymous functions are the same.
In the console, why does the following line return false
?
(function() { alert("hello"); }) === (function() { alert("hello"); })
Is there a comparison operator or other method to identify that these are 'functionally' the same?
EDIT:
People are asking for the use of this.
It's for removing a function that has been previously pushed into an array of functions. See http://jsfiddle.net/w6s7J/ for a simplified test.