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: 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: A classic fundamentals check that also reveals whether you understand let/const and the temporal dead zone.
Answer
Hoisting means declarations are processed before code runs, so they are known in their whole scope.
var is hoisted and initialised to undefined.let, const and class are hoisted too, but stay uninitialised (the temporal dead zone) until the declaration line runs. Accessing them earlier throws a ReferenceError.greet(); // works
function greet() { console.log('Namaste'); }
console.log(a); // undefined
var a = 1;
console.log(b); // ReferenceError
let b = 2;Function expressions (const greet = () => {}) follow the rules of the variable they are assigned to.
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: Shows whether you researched the company or are sending the same answer everywhere.
How to answer
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.
Sample answer · STAR
"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."
Why they ask this: A quick fundamentals question that checks attention to detail.
Answer
undefined means a value was never assigned: an uninitialised variable, a missing object property, a missing function argument, or a function with no return.null is an intentional "no value" that a developer assigns.let a; // undefined
const obj = {};
obj.missing; // undefined
let b = null; // explicitly empty
typeof undefined; // 'undefined'
typeof null; // 'object' (a historical bug)
null == undefined; // true
null === undefined; // falseUse ?? (nullish coalescing) to give a default for both: const name = input ?? 'Guest'.
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: 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: Asked at the end of almost every interview. Good questions show genuine interest and help you judge the company.
How to answer
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.
Sample answer · STAR
"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?"
Why they ask this: Hooks are how modern React is written; breaking the rules causes hard-to-find bugs.
Answer
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.
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
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.
Sample answer · STAR
"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."
Why they ask this: Wrong keys cause subtle UI bugs, so this checks practical experience.
Answer
A key gives each list item a stable identity, so React can tell which items were added, removed or reordered between renders and keep the right state and DOM node for each one.
{todos.map((todo) => (
<TodoItem key={todo.id} todo={todo} />
))}