The post about the (quite logical) javascript features (
habrahabr.ru/blogs/javascript/84311 ) caused a heated discussion. Following the author of WTFJS.com, I screwed up badly, considering these oddities to be really something mystical) Many thanks to all those who explained why this is actually happening or why this was done. Understanding such subtleties allows you to switch to “you” in communication with the language. Someone will say that any programmer who owns JS should know this? Maybe. But as it turned out, many did not know, and I am among them.
In the comments, many did not hesitate to call themselves “the guru of JS”, ​​many wrote that there is nothing difficult in these examples. It is very happy. No, really, no irony, do not think. It is simply wonderful that there are real professionals on this resource who are ready to share their experience. For this and read Habr.
Sorry for the lyrical introduction. So, in order to somehow rehabilitate myself, I offer a small test on the knowledge of JS from
Perfection kills . There are 14 questions in the test. The main thing that I like about it is that almost all tasks are a normal, quite practical code, and not brain-constructive constructs that you will hardly ever use.
')
The test mainly consists of questions on knowledge of the scope, functional expressions (and their differences from the function declaration), references, definitions of variables and functions, the order of calculations, and a couple more things.
There are 14 questions in the test. After passing, do not hesitate to publish your results in the comments (for example, "3 out of 14. I went to read Flanagan" or "14 out of 14. I will go again to read Flanagan for the night").
ps: Such tests, in my opinion, are useful to everyone: professionals - in order to “be in good shape”, newbies (and, perhaps, not only) will surely find many unusual designs and go read about it.
By the way, Flanagan is following the comments on this post .
upd: the author of the test is now with us -
kangax .