Practice 47 Senior Software Engineer interview questions covering system design, architecture decisions, and technical leadership.
Question 14 of 47
Why the Interviewer Asks This Question
Example Answer
How to Answer
Community Answers

William Swansen has worked in the employment assistance realm since 2007. He is an author, job search strategist, and career advisor who helps individuals worldwide and in various professions to find their ideal careers.
During an interview for a senior software engineer's position, you will be asked about many different technologies used in the job. Some of these questions will ask you to compare two different technologies which are similar but have different functions or outcomes. Demonstrating your knowledge of these differences will impress the interviewer and satisfy their curiosity about your understanding of the topic.

William Swansen has worked in the employment assistance realm since 2007. He is an author, job search strategist, and career advisor who helps individuals worldwide and in various professions to find their ideal careers.
"The key difference between blocking and non-blocking calls in JavaScript is that the first one is a synchronous operation and the other is asynchronous. Blocking calls require JavaScript operations to wait until a non-Javascript operation provides input or output or finishes its execution. Non-blocking JavaScript calls can execute operations synchronous with other pieces of the script. It is important to know this since JavaScript is a single-threaded executable and can only execute code in a specific order, waiting for the previous operation to be completed before it starts the next one. Executing non-blocking calls overcomes this limitation and helps programs run faster."

William Swansen has worked in the employment assistance realm since 2007. He is an author, job search strategist, and career advisor who helps individuals worldwide and in various professions to find their ideal careers.
When responding to a question like this, start by defining each term, then briefly compare them, stating their features and benefits. Quickly contrast them, stating how they differ, and finish by possibly providing an example to illustrate your answer. This methodology will allow you to organize your answer for any question asking you to compare two terms or technologies.

Interview Coach
Jaymie
A real coach, not AI. I read every answer myself and write back with personalized feedback.
Typically responds within 24 hours.
0 - Character Count
Anonymous Answer
A blocking call is otherwise known as a synchronous operation and a non-blocking call is an asynchronous operation. A synchronous JavaScript operation waits for another process to finish before moving on to the next part of the code. An asynchronous operation does not wait for the operation to finish and instead proceeds on with the rest of the code execution. In the early days of JavaScript, callbacks were used in frameworks like Ajax to replicate synchronous-like behavior and would provide the operation with a callback function to be executed once the process was complete. Later on, Promises were introduced to JavaScript which allowed for an executable call chain to be defined in a synchronous order with a catch statement at the end of the chain. And more recently, the async-await functionality was added to JavaScript that allows you to easily specify any section of code that must be executed synchronously.

Amanda's Feedback
Excellent! You've explained the difference between blocking and non-blocking calls simply and clearly. Consider expanding this answer to specify when or how you typically use each, showing the interviewer that you not only understand the functionality but when each is best used.
Unlock expert responses to system design and leadership questions interviewers expect.
Get StartedJump to Question

Written by William Swansen
47 Questions & Answers • Senior Software Engineer

By William

By William