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
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.
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
Why they ask this: Wrong keys cause subtle UI bugs, so this checks practical experience.
Answer
Why they ask this: The most basic React concept; a weak answer is a red flag for any React role.
Answer
Why they ask this: Every developer calls or builds APIs; correct method use is a basic expectation.
Answer
Why they ask this: Correct status codes make APIs predictable for frontend and mobile developers.
Answer
Why they ask this: Every team uses Git; this checks you can collaborate without rewriting shared history.
Answer
Why they ask this: A basic Git question that shows whether you understand remote-tracking branches.
Answer
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.
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} />
))}| Props | State | |
|---|---|---|
| Owned by | the parent | the component itself |
| Changeable by the component? | No, read-only | Yes, through the setter (setX) |
| Purpose | configure a component and pass data down | data that changes over time |
function Counter({ step }) { // step is a prop
const [count, setCount] = useState(0); // count is state
return <button onClick={() => setCount((c) => c + step)}>{count}</button>;
}Changing either one re-renders the component. When two siblings need the same data, lift the state up to their common parent and pass it down as props.
| Method | Use | Safe | Idempotent |
|---|---|---|---|
GET | read a resource | yes | yes |
POST | create a resource or trigger an action | no | no |
PUT | replace a resource completely | no | yes |
PATCH | update part of a resource | no | not guaranteed |
DELETE | remove a resource | no | yes |
POST /orders calls can create two orders, while PUT /users/5 with the same body twice gives the same result.This matters for retries: clients and proxies can safely retry idempotent requests after a network error. For payments, use an idempotency key to make POST safe to retry.
200 OK, 201 Created (after a POST that creates something), 204 No Content (success with no body).301 Moved Permanently, 302 Found, 304 Not Modified (use the cached copy).400 Bad Request: malformed request.401 Unauthorized: not authenticated (no token or a bad token).403 Forbidden: authenticated but not allowed.404 Not Found.409 Conflict: for example a duplicate email.422 Unprocessable Content: validation errors (Laravel's default).429 Too Many Requests: rate limited.500 Internal Server Error, 502 Bad Gateway, 503 Service Unavailable.A frequent interview trap is the difference between 401 and 403.
Both bring changes from one branch into another:
git merge main creates a merge commit that joins the two histories. Nothing is rewritten, so it is safe on shared branches, but the history shows every merge.git rebase main replays your branch's commits on top of main, creating new commits with new hashes. The result is a clean, linear history.git switch feature/login
git fetch origin
git rebase origin/main # update your feature branch
# fix conflicts, then: git add <file> && git rebase --continue
git push --force-with-lease # needed because history changedGolden rule: never rebase commits that other people have already pulled (such as main). Rebase your own feature branch; merge into shared branches, usually through a pull request.
git fetch downloads new commits and branches from the remote and updates the remote-tracking branches (origin/main). It does not change your working files or your current branch.git pull is git fetch followed by a merge (or a rebase, with git pull --rebase) into your current branch.git fetch origin
git log --oneline main..origin/main # see what is new before merging
git pull --rebase origin main # fetch and replay your commits on topFetching first is safer when you want to review incoming changes before integrating them.