Recently, I conducted brief technical interviews with dozens of front-end candidates for department recruitment.

The background of this recruitment is that we need some front-end engineers with about 3 years of experience to develop and maintain some mobile single-page modules and some front-end applications of PC add, delete, change and check. Because the outsourcing model is adopted, the predetermined strategy is that the technology can be used, and the project is not required to be completed independently, but there are certain requirements for business experience, and the resume is very loose. The interview focuses on business understanding, communication, and personality.

For that reason, this wave of interviews has given me a bit of a shock about the front-end ecology.

Let me pick out two of my interview questions and show them to you.

The first is a classic question that examines the use of closures:

// What is outputfor (var i = 0; i < 10; ++i) {
    setTimeout(function () {console.log(i)}, 0);
}Copy the code

First, what does this code output? If I want this code to print 0{{123456789:0}}, what should I do?

The second problem is the oral implementation. The design scenario is as follows:

An application module consists of A text box input and buttons A and B. Clicking on button A makes an Ajax request to address urlA and populates the input with the returned string (overwriting the existing data in the input). Clicking on button B makes an Ajax request to address urlB. And populate the input with the returned string (overwriting the input’s existing data).

When the user clicks buttons A and B in sequence, the expected effect is that the input will be filled with the data returned by urlA and urlB in sequence. However, due to the slow return of the request to urlA, the data returned by urlB will be overwritten by the data returned by urlA, which is inconsistent with the expected sequence.

How to design the code to solve this problem?

I think for the front-end engineers on Zhihu, this is simply a child’s problem, especially the first question, any interview question can be found, although the second question is open, but the requirements are very simple, as long as you can figure out a way, do not require to write code.

However, as a result of the interview, most of the interviewees failed to answer the first question correctly, and almost all the interviewees could not figure out the method for the second question, and many of them even gave up the answer due to lack of patience.

At the same time, the vast majority of applicants showed great enthusiasm for the framework, for the framework related questions, whether they can answer the key point, generally speaking. However, when I asked if I could come up with a way to implement two-way binding, I didn’t get a solid answer, to be exact, almost no one would answer (although such a question is irrelevant for this recruitment).

I don’t mean to criticize frameworks like Mr. Adam, but I want to say another thing

Through communication, I found that many of these applicants have bought houses with loans, and some of the senior applicants with more than 5 years of experience have already had children. The oldest applicant has a monthly mortgage of 6000+ and his child is going to junior high school.

So you can see why I was a bit surprised — I saw a huge risk.

According to my understanding, being able to answer the above two interview questions is the most basic requirement for successful JS programming work — first of all, you should not be too unfamiliar with the language, and then you should have at least a little ability to solve practical needs through programming.

So it’s not a matter of love, it’s a matter of passion, it’s a matter of mortgage. These older people may have been working in the industry before the front-end boom, and they have their own way of surviving (for example, there is a VB era over the brothers, has bought a number of shops, work out of pure play). But there are some relatively young, may be at the forefront of the most popular time, through training, successfully find a job, joined the ranks of front-end engineers. While their classmates were still living in the basement, they already had a monthly salary of 10,000 yuan and bought a house early.

The question is, how do you pay your mortgage over skills you don’t actually have?

I put this article has nothing to do with “multimedia”, as the beginning of this so-called to write some “front-end & multimedia” content column, is the hope to tell the friends who are ready to rely on the front end for dinner —

If you want to use front-end technology to pay your mortgage, you can’t do both of the interview questions I gave you above.