Filter by the role you are applying for, open a question, and practise explaining the answer out loud. Mark it practised when you can.
Why they ask this: Closures power callbacks, React hooks, module patterns and data privacy, so they show how well you know the language.
Answer
A closure is a function together with the variables from the scope where it was created. The inner function keeps access to those variables even after the outer function has returned.
function makeCounter() {
let count = 0; // private to the closure
return {
increment: () => ++count,
current: () => count,
};
}
const
Why they ask this: Software is built in teams; interviewers look for respect, communication and a focus on the outcome.
How to answer
Sample answer · STAR
Why they ask this: The company wants to know whether you fit their budget and whether you have researched the market.
How to answer
Sample answer · STAR
Why they ask this: Shows whether you understand how async code actually runs, which matters for debugging ordering and UI freezes.
Answer
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 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: 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
Why they ask this: Technology changes constantly, so companies hire juniors who can learn on their own.
How to answer
Sample answer · STAR
Why they ask this: Most React bugs (infinite loops, stale data, memory leaks) come from misusing useEffect.
Answer
Practical uses:
count cannot be changed from outside.const add5 = makeAdder(5).Use STAR and focus on your actions. Show that you listened, kept it about the work (not the person), found a fair solution, and that the project benefited.
Avoid: blaming a teammate, a story where you "won" the argument, or saying you have never had a conflict.
Situation: In our final-year project, two teammates and I were building a college attendance app. One teammate wanted to switch from React to Vue three weeks before our internal demo because he was more comfortable with it.
Task: As the person handling the frontend integration, I needed us to agree quickly without hurting the team.
Action: I asked to talk one to one first and listened to his reasons. He was struggling with React state and felt behind. I suggested we keep React because two of us already had working screens, and I offered to pair-program with him for an hour each evening that week. I also split the tasks so he owned the reports screen, which used simpler components.
Result: We finished the demo on time, he became confident with React hooks, and our supervisor rated the project "excellent". I learnt that many technical disagreements are really about confidence or workload, and that solving the real issue works better than arguing about tools.
Avoid: saying "anything is fine", giving a single number far above the market, or using your personal expenses as the reason.
"Based on my research on salary data and job posts for junior React developers in Kathmandu with internship experience, I'm looking for around NPR 35,000 to 45,000 per month before tax.
That said, I'm flexible. Learning opportunities, mentorship and benefits like PF and festival allowance matter to me too. Could you share the budgeted range for this role?"
(Replace the numbers with your own research: ranges change with the role, city, company size and your skills.)
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(() => console.log('3'));
console.log('4');
// Output: 1, 4, 3, 2Microtasks 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.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.
Describe how you learn: official documentation, a small proof of concept, asking for help at the right moment. Then show the result of applying it.
Avoid: only listing courses or certificates without showing that you used the skill.
Situation: In my internship, the team decided to add push notifications to their Flutter app, and nobody had used Firebase Cloud Messaging before.
Task: My mentor asked me to research it and build a working prototype within one week.
Action: I read the official FlutterFire documentation first, then built a tiny separate app that only received a test notification. Once that worked, I wrote down the setup steps for Android and iOS and the problems I hit, such as notification permissions on Android 13. I asked a senior for a 20-minute review before integrating it into the main app.
Result: The prototype worked on day four, the feature shipped in the next release, and my setup notes became the team's internal guide. My approach now is always: documentation, a tiny prototype, notes, and then integration.
useEffect(effect, deps) runs effect after render:
[]: runs once after the first render (mount).[a, b]: runs after the first render and again whenever a or b changes (compared with Object.is).The function you return is the cleanup. It runs before the effect runs again and when the component unmounts. Use it to remove listeners, clear timers and cancel requests.
useEffect(() => {
const controller = new AbortController();
fetch(`/api/jobs?q=${query}`, { signal: controller.signal })
.then((r) => r.json())
.then(setJobs)
.catch(() => {});
return () => controller.abort(); // cancel the old request when query changes
}, [query]);Include every value from the component that the effect uses in the array. Missing dependencies cause stale values.