Read this article in: Russian.
Introduction
In this small note we will consider strategy of passing arguments to functions in ECMAScript.
Generally this section of a computer science is called evaluation strategy, i.e. set of rules for evaluation and calculation some expressions in programming language. Strategy of passing arguments to function is its special case.
Read more »
April 10th, 2010 |
3 Comments |
1052 views
Category: ECMAScript |
Tags: by reference, by sharing, by value, ECMA-262-3, ECMAScript, Evaluation strategy
Read this article in: Russian, Chinese.
Introduction
In this article we will more in detail talk about one of general ECMAScript objects — about functions. In particular, we will consider various types of functions, will define how this or that type influences variables object of a context and what contains a scope chain of a certain type of function.
Read more »
April 5th, 2010 |
8 Comments |
1414 views
Category: ECMAScript |
Tags: ECMA-262-3, ECMAScript, Function Declaration, Function Expression, Function Statement
Read this article in: Russian, Chinese.
Introduction
As we already know from the second chapter concerning the variable object, the data of an execution context (variables, function declarations, and formal parameters of functions) are stored as properties of the variables object.
Read more »
March 21st, 2010 |
12 Comments |
1332 views
Category: ECMAScript |
Tags: ECMA-262-3, ECMAScript, Scope chain, [[Scope]]
Read this article in: Russian, Chinese (version1, version2).
Introduction
Always in programs we declare functions and variables which then successfully use building our systems. But how and where the interpreter finds our data (functions, variable)? What occurs, when we reference to needed objects?
Read more »
March 15th, 2010 |
21 Comments |
1997 views
Category: ECMAScript |
Tags: Activation object, ECMA-262-3, ECMAScript, Variable object
Read this article in: Russian, Chinese, Arabic.
Introduction
In this note we will mention execution contexts of ECMAScript and types of executable code related with them.
Read more »
March 11th, 2010 |
7 Comments |
4203 views
Category: ECMAScript |
Tags: ECMA-262-3, ECMAScript, execution context
Read this article in: Russian, Chinese (version1, version2).
Introduction
In this article we will discuss one more detail directly related with execution contexts. The topic of discussion is the this keyword.
Read more »
March 7th, 2010 |
21 Comments |
2000 views
Category: ECMAScript |
Tags: ECMA-262-3, ECMAScript, this
Read this article in: Russian.
Introduction
This is the second part of article about object-oriented programming in ECMAScript. In the first part we discussed the general theory and drew parallels with ECMAScript. Before reading of the current part, if it is necessary, I recommend reading the first part as in this article we will actively use the passed terminology. Interested persons can find the first part here: ECMA-262-3 in detail. Chapter 7.1. OOP: The general theory.
Read more »
March 4th, 2010 |
11 Comments |
2298 views
Category: ECMAScript |
Tags: ECMA-262-3, ECMAScript, Object-oriented programming, OOP, Prototype
Read this article in: Russian.
Introduction
In this article we consider major aspects of object-oriented programming in ECMAScript. That the article has not turned to “yet another” (as this topic already discussed in many articles), more attention will be given, besides, to theoretical aspects to see these processes from within. In particular, we will consider algorithms of objects creation, see how relationships between objects (including the basic relationship — inheritance) are made, and also give accurate definitions which can be used in discussions (that I hope will dispel some terminological and ideological doubts and messes arising often in articles on OOP in JavaScript).
Read more »
March 4th, 2010 |
0 Comments |
1581 views
Category: ECMAScript |
Tags: ECMA-262-3, ECMAScript, Object-oriented programming, OOP, Prototype
Read this article in: Russian.
Introduction
In this article we will talk about one of the most discussed topics related to JavaScript — about closures. The topic, as a matter of fact, is not new and was discussed many times; there is a considerable quantity of articles devoted to this essence (some of them are very good, for example, article of Richard Cornford noted in the list of the additional literature), however we will try to discuss and understand it more from the theoretical point of view, and also will look on how closures are made in ECMAScript from within.
Read more »
February 28th, 2010 |
16 Comments |
2091 views
Category: ECMAScript |
Tags: Closure, ECMA-262-3, ECMAScript, First-class objects, Funarg, Functional programming
Recently some JavaScript quizzes appear then and there with the competitive titles wondering whether “you know JavaScript”? The recent quizzes were by kangax, Dmitry Baranovskiy and by Nicholas C. Zakas. All that quizzes are interesting, many questions though are mostly theoretical rather than practical.
And again just for fun, I suggest another ECMAScript quiz. I won’t use some boring things such as “a+++b”; but I will more sophisticated
Some interesting questions are collected from newsgroups, mailing lists, forums and from my own.
Read more »
February 18th, 2010 |
26 Comments |
1276 views
Category: ECMAScript |
Tags: ECMA-262-3, ECMAScript, quiz