How do you judge a Javascript programmer by only 5 questions?

Mattias Petter Johansson
Fun Fun Function
Published in
3 min readMay 11, 2015

I was recently asked this on Quora, and here are my answers. Please note -these questions only indicate if someone knows JavaScript, it does not assert their general programming knowlege. Also, these are hard. If you cannot answer all five, it doesn’t mean that you’re bad at JavaScript — it only means that you’re not awesome … yet.

  1. Can you talk about apply, please?
    This is a bit of a factoid, so that someone can answer it doesn’t give you much information, but if they cannot, it gives a truckload. Any JavaScript programmer that has written a library or two, not used libraries built by others, will know the answer to this.
    Addendum: Several people are calling #1 into question. I must be very clear here that I stand firm on this one. If you haven’t used apply, you are most likely missing out on the most powerful and overlooked aspects of the language. It’s also an indicator that you haven’t tried your hand at building a library yet, because when building libraries, apply and call are very commonly used.
  2. Can you explain map to me?
    Map is a an extremely useful functional programming concept that any compsci person will know. If someone doesn’t know this, it’s a sign that they lack an understanding of computer science and/or lack an understanding of the language. In addition, the explanation itself will give you a sense of how much the person knows about the language just in the way they talk. If the person does well on this question, ask about reduce as a followup. If you do not know what map is, it means that you have done zero functional programming and you’re missing out — start your journey here: A dirt simple introduction to higher order functions in JavaScript.
  3. Can you explain bind to me?
    This is a really great question, because it delves into the concept of this. You can basically drill the interviewee for quite some time on this, as it is a very large subject. You’ll get a good sense of a programmer by having this discussion. If the interviewee responds well to the question, ask them to explain prototype.
  4. Can you explain how closures work to me?
    This is a great question to ask programmers that claim to be experienced in general, but not with JavaScript. Closures are a general programming concept that is extraordinarily important in JavaScript. If they understand closures well, they will learn JavaScript pretty quickly.
  5. Can you please tell me a story about a JavaScript performance problem that you’ve encountered and how you approached solving it?
    This will tell you a lot about how much programming a person has actually done, in their own words. A big one to keep an eye out for is that they should be praising the Chrome Developer tools, and not rely too much on theoretical time complexity.

If you don’t know the answers to these questions, please don’t feel discouraged. Instead, get excited that the language that you’re coding has much more depth than you thought, and that you have some really cool stuff to learn.

--

--

Mattias Petter Johansson
Fun Fun Function

Creator of Fun Fun Function, a YouTube show about programming.