Top of JS Topics mostly failed by developers

Top-5 most failed JS topics based on quizzes statistics.

How often do you ask yourself while coding: «What kind of magic is going on here?»

No magic, it’s just a JavaScript we don’t know.

Intro

Some time ago we created a telegram channel with JS quizzes. Today we’d like to share statistics on what JS aspects are the most hardest for developers based on the failed answers percents.

About quizzes

First of all, we have to say what those quizzes are.

The quizzes we post cover the JS basics but not in a simple way. To answer correctly a respondent has to have a deep JS knowledge and understand how an engine interprets the instructions.

For example, every developer knows how to declare a variable in JS. One of the special words has to be used: var, let or const.

Many developers know how this instruction will be handled by the engine. It divides this instruction into two ones:

Variable declaration (the first line) is moved by the engine on the top of their scope before script running. And variable initialisation (the second line) is handled just in time the engine is on that line of the code.

But how many developers know how the engine interprets the following piece of code?

To answer correctly a developer has to know how the engine handles the multi declarations of the same variable name and which has more priority: variable declaration or function declaration?

This question is also about variable declaration, but does not look so easy.

Do you know the result? Try yourself. (Please don’t be embarrassed by the Russian language in the question — all you need is to choose the correct answer)

When we explain how exactly that piece of code is processed, 94% of respondents admitted that they didn’t know it works that way (ah, numbers are a stubborn thing!)

Statisctics vs Machine Learning & AI & Deep learning.

About calculations

The calculation principle is simple — we divided all quizzes by topic (15 topics in total) and calculated the average percentage in each topic.

There is one inaccuracy in our approach, which is unlikely to have a significant impact on the result. To solve some of the quizzes, the developer must understand several topics, and in case of an incorrect answer, it is not known which one of them led to it. Such quizzes are placed in several categories at once.

Don’t think about the numbers below as constants. Everyday new developers are solving our quizzes and values are changing. However, our observations showed that regardless of the number of answers, the rating does not change much and the overall picture remains the same.

Now, when you know what kind of quizzes our statistics is based on and how we calculate it, let’s see the TOP 5 of most failed JavaScript topics.

TOP-5: Variable Scope. 46% of correct answers.

For us this was the most fruitful topic, on which we easily came up with various challenges. To be honest, we didn’t expect the scope to take only the fifth place, as it seems more difficult to us. But the statistics know better.

An example of scope quiz:

Try yourself.

TOP-4: Promises. 43% of correct answers.

Promises are a pretty straightforward tool to use. However, when a programmer needs to know how they work “from the inside” in order to answer a quiz, not many of them know the answer.

For example to answer the following quiz you need to know the algorithm of Promise’s state changing:

Try yourself.

If you want to dive deeper in how Promises work under the hood, read this article:

TOP-3: Hoisting. 34% of correct answers.

We believe that hoisting is one of the most interesting topics in JavaScript because it makes you think about how JavaScript works. It makes you know that the engine processes a JS program in two stages. Which in turn can lead you to wonder if it’s an interpreted language or not.

So ,with a deep understanding of hosting, you can get very close to the language you’re actually working with.

One of many examples of hoisting:

Try yourself.

TOP-2: ES6 modules. 32% of correct answers.

Can we change an imported variable so that the change is applied in the source module? Will an imported variable change if it is changed asynchronously after being exported? Our statistics show that only 32% of developers in avarage know the answers to these and other questions about modules.

Try yourself.

TOP-1: “this” variable. An execution context. 30% of correct answers.

Meme: Oh my God I’m the winner.

We have a winner! Are you surprised? We are not! Our 12 years of experience of interviewing the JS engineers tell us the same. Understanding of “this” has always been the most difficult challenge for developers. And this is one of the reasons why React.js migrated from OOP to functional programming.

If you are one of the developers feeling confused about an execution context, do not give up, you just need a little more practice.

Try yourself.

In conclusion

It is unfortunate to hear that many developers do not consider it necessary to learn JavaScript in its entirety with all its features and corner cases. Why know what the code will output if you can run and check. Unfortunately, most developers think so. Beginners in general often spend almost no time on JS itself and immediately move on to learning frameworks. At Intspirit, we believe that there is nothing in the language that is not important and not worthy of study. Javascript is a complex language with many pitfalls and learning it from start to finish is very difficult, if not impossible. But that doesn’t mean we shouldn’t try.

Patric tries to understand JS.

This TOP of “failures” only includes topics that can be classified. Besides them we post quizzes covering more specific JS features. Next time we’ll share TOP most failed quizzes among all topics, subscribe to not miss.

Subscribe to the telegram-channel to become the “know-it-all” person in the office. Follow us on LinkedIn for other cool projects we do.

What is the most difficult thing about JS for you? Share in the comments.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Intspirit Ltd

Intspirit Ltd

High-level software engineers for powerful web solutions https://intspirit.com/