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
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".
Sample answer · STAR
"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."
Why they ask this: Tests your understanding of DOM event bubbling and performance with dynamic lists.
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: Common in search boxes, scroll and resize handlers; shows you think about performance.
Answer
Why they ask this: The standard stack problem; it shows you can pick the right data structure for matching pairs.
Given a string s containing only the characters (, ), {, }, [ and ], return true if: every opening bracket is closed by the same type of bracket, and brackets…
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: Asked at the end of almost every interview. Good questions show genuine interest and help you judge the company.
How to answer
Sample answer · STAR
Why they ask this: Hooks are how modern React is written; breaking the rules causes hard-to-find bugs.
Answer
Why they ask this: Many companies are in Kathmandu Valley, while others are remote or hybrid; HR needs to know whether the arrangement works for you.
How to answer
Sample answer · STAR
Why they ask this: Most React bugs (infinite loops, stale data, memory leaks) come from misusing useEffect.
Answer
Most DOM events bubble up from the target element to its ancestors. Event delegation puts one listener on a parent and uses event.target to work out which child was clicked.
document.querySelector('#todo-list').addEventListener('click', (event) => {
const button = event.target.closest('button.delete');
if (!button) return;
button.closest('li').remove();
});Benefits:
Use event.stopPropagation() carefully, because it breaks delegation for listeners higher up.
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.
Both limit how often a function runs:
function debounce(fn, delay = 300) {
let timer;
return (...args) => {
clearTimeout(timer);
timer = setTimeout(() => fn(...args), delay);
};
}
const onSearch = debounce((q) => fetch(`/api/search?q=${encodeURIComponent(q)}`));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.
Always have two or three questions ready. Saying "No, everything is clear" is a missed opportunity. Good questions are about the work, the team and growth:
Ask about salary and leave after an offer or when HR raises it, unless they ask you first.
"Yes, thank you. I have two questions.
First, what would success look like for someone in this role after the first three months?
Second, how does the team review code? I'd like to understand how juniors get feedback so I can improve quickly.
And finally, what are the next steps in the process?"
Hooks are functions that let function components use React features: useState (state), useEffect (side effects), useContext, useRef, useMemo, useCallback, and your own custom hooks (useSomething).
Rules of hooks:
function Profile({ userId }) {
const [user, setUser] = useState(null); // top level: OK
// if (userId) { useEffect(...) } // wrong: conditional hook
useEffect(() => {
if (!userId) return; // put the condition inside
fetch(`/api/users/${userId}`).then((r) => r.json()).then(setUser);
}, [userId]);
return <p>{user?.name}</p>;
}The eslint-plugin-react-hooks lint rules catch most mistakes.
Be honest and specific about what you can do: relocating to Kathmandu, Lalitpur or Pokhara, working on-site or hybrid, or remotely with a reliable internet connection and power backup. If you have constraints, explain them briefly and offer a solution.
For remote roles, show that you can work independently: a quiet workspace, a backup internet connection (or a mobile data plan), and clear communication habits.
Avoid: saying yes to something you cannot actually do. It will cause problems after you join.
"Yes. I'm currently in Chitwan, and I'm ready to move to Kathmandu within two weeks of an offer. I have relatives in Lalitpur where I can stay at first.
I'm also comfortable with a hybrid setup. During my remote internship last year I worked with a fibre connection plus a mobile data backup, posted daily written updates on Slack, and joined every stand-up on time, so I know how to stay visible and productive when working from home."
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.