JavaScript interview questions at

May 06, 2015 screenshot

I've been meaning to do this ever since I started giving interviews. I wanted to look for online resources that would help me prepare for interviews. True, there are many resources available, but not one for the position of JavaScript Developer. JavaScript development is taking off because of the Server-Client distribution of computing. Therefore, this is a relatively new field, and not much data is available.

This blog post describes my interview experience at a mildly successful startup which is into online real estate. They have recently kicked the hiring of JavaScript developers up a notch. There were five rounds in total(including 1 HR). The time frame of the whole process was about a month long, and there were ample gaps in between rounds.

Round One:

The Interview process began with a non-conventional start. I got an e-mail from the Talent Recruitment Team about my résumé being shortlisted and asking me when I would be available for a Skype Interview. I mailed them the appropriate date, and the process began.

The first round began with the usual introductions, my total experience and the technologies I worked. I was asked to rate myself in JavaScript, CSS3 and HTML5 and a few simple questions.

A few of the questions that they asked me were:

  1. Prototype and its usage.
  2. New features of HTML5.
  3. Usage of Local Storage.
  4. A simple data structure that would allow me to make a simple TODO list application.
  5. A complex question on CSS position:absolute and relative.
  6. A custom implementation of indexOf using the prototype object on String.

Round Two:

About a week later, I received a response from the Recruitment Team that they wanted me to take another round. I scheduled another Skype Interview, and it began with the usual introductions. They tested me on a few other concepts.

They tested my JavaScript basics with the following JavaScript interview questions:

  1. Global scope and Local scope.
  2. Hoisting in JavaScript (as an extension of the question above).
  3. How would I sort an Array? (I answered Bubble Sort. Quicksort was a better answer than that.)
  4. An extension of Array.sort() to accommodate characters and integers. I was asked to implement a compare() function and use that as a callback to the Array.sort().
  5. Compare two sorted Arrays. I got it wrong on the first try, but with a nudge from the interviewer in the right direction, I got it correct.
  6. There was a discussion about the kind of work at the company, and since I had used their product, I was more than curious about a few technologies they used and how they implemented it. It was an interesting discussion.

Round Three:

When I had lost all hope, I got another mail that they wanted to schedule a technical round. Like usual, they asked me standard JavaScript interview questions ranging from introducing myself to rating myself. He told me that this was my last technical round. It was a now or never kind of a situation. The technical part : I had mentioned that I worked on Knockout.js framework. I was asked to implement a reasonably simple Task List application with a remove button. It took me a good 15 minutes, but I was able to get it running on Collabedit/jsfiddle.

  1. There was a very discussion about the usage of Knockout and where it was helpful as compared to where it wasn't.
  2. How theming on any application/website worked.
  3. What would you do to speed up the loading of the web page?
  4. AMD - require.js - I was unfamiliar but described what I knew about it.
  5. The hardest part was the puzzles. They put forward two puzzles that I found very difficult to solve. I was flabbergasted, and the interviewer did try to encourage me. He gave me hints, but I gave up.
  6. The interviewer asked me for feedback. I jokingly said that they should make the puzzles a bit easier. He understood that I was puzzled and I did not expect non-technical JavaScript interview questions. I did expect algorithms but not the hefty ones.

Round Four :

This time, I was so sure that they would reject me. However, again, there was another technical round scheduled. I did not have much time between the last two rounds so; I could not prepare a lot of technical/non-technical puzzles.

  1. A custom implementation of
  2. The arguments array - the pseudo-object. How/when and why would I use it?
  3. How would you optimize the performance of JavaScript on your web page?
  4. Then came more puzzles. I was able to solve 1 out of the 3 asked. They were mathematical/algorithmic. I would say that except the one I was able to solve, they were algorithmic.
  5. For feedback, I explained as to why I wasn't able to answer the puzzles. I told the truth that I wasn't in touch with Algorithms and Data Structures.

Round Five :

The round was telephonic and impromptu. It was HR, and he asked some behavioral questions. That's it.