You can add a name to the callback function. Thus, the function name will be displayed during debugging.
As an example in jQuery
$('div').each( function divLoop() { .. });
In OOP, Javascript usually calls a function by the name of the method name.
MyClass.prototype.methodName = function methodName() { ... }
source share