In a eg. a callback, what is the difference between an a named inline function and an anonymous inline function and?
I think it increases the readability, but are there other advantages?
Eg.
element.addEventListener("load", function onLoad() {
// execute code
});
vs.
element.addEventListener("load", function() {
// execute code
});
Edit: I guess I also can do this with a named inline function
...
element.addEventListener("load", function onLoad() {
// execute code ...
element.removeEventListener("load", onLoad);
});