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

4 questions

  • Why they ask this: Checks that you understand scope and hoisting, which explain many real bugs in JavaScript code.

    Answer

    • var is function-scoped, is hoisted and initialised to undefined, and can be re-declared.
    • let is block-scoped ({ ... }), is hoisted but sits in the temporal dead zone until its declaration runs, and cannot be re-declared in the same scope.
    • const behaves like let but the binding cannot be reassigned. The value itself is not frozen: you can still change an object's properties or push to an array.
    js
    for (var i = 0; i < 3; i++) setTimeout(() => console.log(i)); // 3 3 3
    for (let j = 0; j < 3; j++) setTimeout(() => console.log(j)); // 0 1 2
    
    const user = { name: 'Sita' };
    user.name = 'Ram'; // allowed
    // user = {};      // TypeError: Assignment to constant variable

    Rule of thumb: use const by default, let when you must reassign, and avoid var in modern code.

    Open full page
  • Why they ask this: Loose equality causes subtle bugs; interviewers want to see that you default to strict comparison.

    Answer

    • === (strict equality) compares value and type. No conversion happens.
    • == (loose equality) converts the operands to a common type first, then compares.
    js
    0 == '0'          // true  (string converted to number)
    0 === '0'         // false (number vs string)
    null == undefined // true
    null === undefined// false
    '' == 0           // true

    Always use === (and !==) unless you deliberately want conversion. A common, accepted exception is value == null, which checks for both null and undefined.

    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: 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