The ability to nest functions gives us closures. ECMA-262-3 in detail. Chapter 5. Functions. Read this article in: Russian, Chinese (version 1, version 2), French.
In this article we will talk about one of the general ECMAScript objects — about functions. In particular, we will go through various types of functions, will define how each type influences variables object of a context and what is contained in the scope chain of each function. We will answer the frequently asked questions such as: “is there any difference (and if there are, what are they?) Between functions created as follows: from functions defined in a “habitual” way?” Or, “why in the next call, the function has to be surrounded with parentheses?” Since these articles relay on earlier chapters, for full understanding of this part it is desirable to read Chatper 2.
But let us give one after another. In ECMAScript there are three function types and each of them has its own features. JS. The Best Module System for AngularJS Applications. I was working on a small and simple application built with AngularJS the other day.
Generators in Node.js: Common Misconceptions and Three Good Use Cases. Generators have been all the rage lately.
Many Node developers (including myself!) Are excited and intrigued about writing their asynchronous code like this: Kriskowal/q. Immediately-Invoked Function Expression (IIFE) In case you hadn’t noticed, I’m a bit of a stickler for terminology.
Also, If you want to skip ahead, you can just check out some actual Immediately-Invoked Function Expressions, but I recommend reading the entire article. Please understand that this article isn’t intended to be an “I’m right, you’re wrong” kind of thing. I’m genuinely interested in helping people understand potentially complex concepts, and feel that using consistent and accurate terminology is one of the easiest things that people can do to facilitate understanding.
So, what’s this all about, anyways? The heart of the matter.