Why they ask this: Shows whether you understand how async code actually runs, which matters for debugging ordering and UI freezes.
Answer
JavaScript runs your code on one thread with a call stack. Async work (timers, network, DOM events) is handled by the browser or Node.js, and their callbacks are queued.
The event loop repeats:
.then, await continuations) and queueMicrotask.setTimeout callback or an event handler, run it, and go back to step 2.console.log('1');
setTimeout(() => console.log('2'), 0);
Promise.resolve().then
Why they ask this: Filters out candidates who cannot write a simple loop with conditions; order of checks is the classic trap.
Return a list of strings for the numbers 1 to n where: multiples of 3 become "Fizz", multiples of 5 become "Buzz", multiples of both 3 and 5 become…
Why they ask this: Interviewers want to know whether you stayed active and how honestly you talk about setbacks.
How to answer
Sample answer · STAR
Why they ask this: Checks counting with a hash map and comparing frequency, a pattern used in many string problems.
Given two lowercase strings a and b, return true if b is an anagram of a (it uses exactly the same letters the same number of times), otherwise false. Example 1…
Why they ask this: Checks self-awareness and whether you actively work on improving yourself.
How to answer
Sample answer · STAR
Why they ask this: A classic dynamic programming problem that shows whether you can improve an O(n²) idea to O(n).
Given an integer array nums with at least one element, find the contiguous subarray with the largest sum and return that sum. Example 1 Example 2
Why they ask this: Almost every app calls APIs; interviewers check you can write and handle async code correctly.
Answer
Why they ask this: Shows whether you researched the company or are sending the same answer everywhere.
How to answer
Sample answer · STAR
Why they ask this: Checks basic use of sets or hash maps, and whether you think about preserving order.
Given an array of integers, return a new array with duplicates removed, keeping the first occurrence of each value in its original order. Try it without a…
Why they ask this: The company wants to know whether your goals fit the role and whether you are likely to stay and grow with them.
How to answer
Sample answer · STAR
Why they ask this: Tests recursion and how you handle data of unknown depth, which is common with JSON from APIs.
Given an array that can contain numbers and other arrays nested to any depth, return a single flat array with all the values in their original order. Example
Why they ask this: Deadlines are constant in software jobs; interviewers want to see prioritisation and calm, not heroics.
How to answer
Sample answer · STAR
Microtasks always run before the next timer, even a 0 ms one. A long synchronous loop blocks everything, including clicks and rendering.
Gaps are common, for example waiting for results, preparing for Lok Sewa, visa or family reasons, or a slow job market. Answer honestly and briefly, then move quickly to what you did to keep growing: courses, projects, freelancing, open-source work or volunteering.
Avoid: long excuses, blaming others, or pretending there was no gap.
"After my BE results in 2025, I spent about six months helping with our family business in Butwal while my father recovered from an illness.
(Task) I didn't want my skills to fall behind during that time.
(Action) I set myself a routine of two hours a day: I completed a Laravel course, built a stock-tracking app for our own shop, and published it on GitHub with a README and a live demo on Render.
(Result) The shop still uses that app, and the project taught me more about real requirements than any tutorial. Now that my family situation is stable, I'm fully focused on starting my career as a backend developer."
Choose a real, non-critical weakness (not a core requirement of the job), show what you are doing about it, and give evidence of improvement.
Avoid: fake weaknesses ("I'm a perfectionist", "I work too hard"), and weaknesses that disqualify you (for example "I can't work in a team" for a team role).
"My weakness has been speaking up in meetings, especially with senior people.
(Situation) During my internship, I noticed an issue in an API response format but didn't mention it in the stand-up. It cost the team a day of rework later.
(Action) Since then I write down my points before every meeting, and I made a rule to share at least one update or question in each stand-up. I also joined a local developer meetup in Kathmandu and gave a five-minute lightning talk.
(Result) In my last two months of the internship, my mentor said my updates were among the clearest on the team. It still takes effort, but it no longer stops me from raising problems early."
A Promise represents a value that will be available later (pending, then fulfilled or rejected). async/await is syntax on top of promises that makes async code read like synchronous code.
// Promise chain
fetch('/api/jobs')
.then((res) => res.json())
.then((jobs) => console.log(jobs))
.catch((err) => console.error(err));
// async/await
async function loadJobs() {
try {
const res = await fetch('/api/jobs');
if (!res.ok) throw new Error(`HTTP ${res.status}`);
return await res.json();
} catch (err) {
console.error(err);
}
}Points worth mentioning:
async function always returns a promise.try/catch for errors with await.await Promise.all([...]) instead of awaiting one after another.Research the company beforehand: its products and clients, its tech stack (job posts, engineering blog, GitHub), its culture, and recent news. Connect two specific things about them to your goals and skills.
Avoid: "because it's a big company", focusing only on salary, or generic praise that could apply to anyone.
"Three reasons. First, your product: I've used your hotel-booking platform when planning a trip to Mustang, and I like that it works well even on a slow mobile connection, which is the kind of engineering I want to learn.
Second, your stack: your job post mentions Laravel and Vue with automated testing, which matches what I've been practising in my projects.
Third, I read on your engineering blog that juniors get a mentor and pair-program in their first three months. Learning from experienced developers is my priority at this stage, so that's very appealing to me."
Show ambition that fits the company: growing your technical depth, taking ownership, and helping others. Keep it realistic and linked to the path this role offers.
Avoid: "abroad" or "running my own company" as your main answer, saying you want the interviewer's job, or "I don't know".
"In five years I'd like to be a strong mid-level or senior backend developer: someone the team trusts to design and own a feature end to end, from database design to deployment and monitoring.
I'd also like to be mentoring juniors the way I hope to be mentored here, and to have deeper knowledge of system design and performance. I see this role as the right first step because it combines real production work with the chance to learn from senior engineers."
Show how you prioritised, communicated early about risks, and delivered something useful, even if that meant reducing scope.
Avoid: stories that rely on skipping sleep for days as the main strategy, or a deadline you missed without learning anything.
Situation: During my internship, a client needed an event-registration form live in three days for a conference in Kathmandu, and the developer who started it had fallen sick.
Task: I had to finish the form, the admin list and the confirmation emails.
Action: On the first morning I listed every remaining task and agreed with my supervisor which were must-haves (registration, validation, confirmation email) and which could wait (CSV export, payment integration). I posted a short progress update every evening and flagged on day two that email delivery needed the client's SMTP details, so we got them in time.
Result: The must-have features went live a day early, more than 400 people registered, and we added the CSV export the following week. I learnt that agreeing on priorities and raising blockers early matters more than working longer hours.