What's more important in JS: performance, or the understandability of the code?

[quote=“felgall, post:29, topic:223000, full:true”]
You should never be doing those things except where the function is actually a method and is sharing access to the properties of the object.[/quote]

Yes indeed, however even your addEvent function reaches out and mucks around with both the addEvent and removeEvent variables. I question such techniques, for normally there are better ways to do these things.