TechHire NepalConnecting Talent, Building Careers
Find JobsCompaniesCourses
Find Talents
Sign inGet Started →
Find JobsCompaniesCourses
Find Talents
Sign inGet StartedHire Talent
TechHire Nepal

Nepal's #1 tech job platform. Connecting top talent with the best companies.

For Job Seekers

  • Browse Jobs
  • Companies
  • Tech Salaries
  • Interview Prep
  • Courses
  • Career Advice

For Employers

  • Post a Job
  • Talent Search
  • Pricing
  • Employer Dashboard

Company

  • About
  • Blog
  • Careers
  • Contact

Resources

  • Training Institutes
  • Projects
  • Tutorials
  • Roadmaps
  • Notes
  • Open Sources

Community

  • Discussions
  • Tech Events
  • Hackathons
  • Developer Meetups
  • Tech News

More

  • Help & Support
  • Salary Tax Calculator
  • Company Registration Guide
  • Labour Act

Stay in the loop

A weekly digest of the best tech articles and jobs in Nepal.

© 2026 TechHire Nepal. All rights reserved.

Privacy PolicyTerms of ServiceCookie Policy
HomeInterview PrepQuestion bank
Question bank

Interview Questions, Answered Clearly

Filter by the role you are applying for, open a question, and practise explaining the answer out loud. Mark it practised when you can.

Type
TechnicalCodingHR / BehaviouralAll types
Role
All rolesFrontend DeveloperBackend DeveloperFull-Stack DeveloperMobile Developer
Topic
All topicsJavaScript10React7HTML & CSS7PHP & Laravel9SQL & Databases6HTTP & REST APIs6Git4OOP & Design4Flutter5React Native5Arrays & Hashing4Strings3Searching & Stacks2Logic Basics1HR Basics9Behavioural (STAR)3
Level
AnyEasyMediumHard

46 questions

  • 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…

    Open full page
  • 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.

    • Function declarations are hoisted with their body, so you can call them before they appear.
    • 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.
    js
    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.

    Open full page
  • 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…

    Open full page
  • 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."

    Open full page
  • 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.
    js
    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; // false

    Use ?? (nullish coalescing) to give a default for both: const name = input ?? 'Guest'.

    Open full page
  • 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…

    Open full page
  • 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."

    Open full page
  • 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…

    Open full page
  • 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:

    • "What would a typical first month look like for this role?"
    • "How do junior developers get feedback: code reviews, mentoring, one-to-ones?"
    • "What does the tech stack look like, and what are you planning to change?"
    • "How do you measure success for this position after six months?"
    • "What are the next steps in the hiring process, and when can I expect to hear back?"

    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?"

    Open full page
  • 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:

    1. Call hooks only at the top level of a component or custom hook, never inside conditions, loops or nested functions. React identifies each hook by its call order.
    2. Call hooks only from React function components or custom hooks, not from regular functions.
    jsx
    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.

    Open full page
  • 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."

    Open full page
  • 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.

    jsx
    {todos.map((todo) => (
      <TodoItem key={todo.id} todo={todo} />
    ))}
    • Use a stable, unique id from your data.
    • Avoid the array index as a key when items can be inserted, deleted or reordered. React would then match state (such as an input's text) to the wrong item.
    • Keys only need to be unique among siblings.
    Open full page
1234