How to de-anonymize your anonymous functions
First of all, de-anonymized functions are called named functions and they look a lot like “regular” functions (in fact, they are).
First of all, de-anonymized functions are called named functions and they look a lot like “regular” functions (in fact, they are).
I really like undos. If I could undo that that last beer… Unfortunately, I can’t. But, I can offer undo to users of my application.
If I look at my stats, a lot of people are wondering how to write a singleton class. I already wrote about it before but my old solution exposed the instance of the class so more than one instance could be created thus making it not completly a singleton class.
I really don’t like the “non-destructive” expression but I couldn’t come up with a better one. What? You want to create a function but you will overwrite the old one. You just want to add some code before or after it. Example, you create a javascript applet that can be added to web sites you [...]
Now is the time. I can’t go forward if I don’t talk about closures. What are closures? Closures are your friend. That’s the first thing you need to know about them. They will help you keep your code clean, healthy and easy. A closures is created every time you create a function in a function [...]
In javascript, all functions are an instance of the class Function (with a capitalized F). The old way Everybody knows how to do it. In fact most languages do it this way. Boring but you can’t write javascript without knowing it. [source:javascript] function f() { } [/source] The uppercase F way You can directly create [...]