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

5 questions

  • Why they ask this: An open-ended classic that shows how broad your understanding of the web is.

    Answer

    1. URL parsing: the browser works out the scheme (https), host and path.
    2. DNS lookup: the hostname is resolved to an IP address (browser cache → OS cache → resolver → root, TLD and authoritative name servers).
    3. TCP connection to the server on port 443 (a three-way handshake). HTTP/3 uses QUIC over UDP instead.
    4. TLS handshake: the server proves its identity with a certificate and both sides agree on encryption keys.
    5. HTTP request: for example GET /jobs with headers and cookies.
    6. Server side: a load balancer or web server (Nginx) passes the request to the app (Laravel or Node), which may query the database and returns a response, often via a CDN cache.
    7. Rendering: the browser parses HTML into the DOM and CSS into the CSSOM, runs JavaScript, builds the render tree, then does layout and paint.
    8. Extra requests load images, scripts and fonts, and caching headers decide what is reused next time.

    Go deeper on whichever part matches the role you are applying for.

    Open full page
  • Why they ask this: Every developer calls or builds APIs; correct method use is a basic expectation.

    Answer

    Open full page
  • Why they ask this: Correct status codes make APIs predictable for frontend and mobile developers.

    Answer

    Open full page
  • Why they ask this: Most backend roles in Nepal build JSON APIs for web and mobile clients.

    Answer

    Open full page
  • Why they ask this: Every frontend developer meets CORS errors when calling an API on another domain.

    Answer

    Open full page
MethodUseSafeIdempotent
GETread a resourceyesyes
POSTcreate a resource or trigger an actionnono
PUTreplace a resource completelynoyes
PATCHupdate part of a resourcenonot guaranteed
DELETEremove a resourcenoyes
  • Safe means the request does not change server data.
  • Idempotent means sending the same request several times leaves the server in the same state as sending it once. Two identical 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.

  • 2xx success: 200 OK, 201 Created (after a POST that creates something), 204 No Content (success with no body).
  • 3xx redirect: 301 Moved Permanently, 302 Found, 304 Not Modified (use the cached copy).
  • 4xx client error:
    • 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.
  • 5xx server error: 500 Internal Server Error, 502 Bad Gateway, 503 Service Unavailable.

A frequent interview trap is the difference between 401 and 403.

REST (Representational State Transfer) is an architectural style for APIs built on HTTP. Key ideas:

  • Resources are identified by URLs using nouns: /jobs, /jobs/42, /companies/7/jobs.
  • HTTP methods express the action: GET /jobs lists, POST /jobs creates, PATCH /jobs/42 updates, DELETE /jobs/42 deletes.
  • Stateless: each request carries everything needed (such as the auth token). The server keeps no client session between requests.
  • Representations: usually JSON, with the right Content-Type.
  • Correct status codes and a consistent error format.
  • Cacheable responses where appropriate.

Good practice: version the API (/api/v1), paginate lists, use plural nouns and avoid verbs in URLs (POST /jobs/42/applications, not /applyJob).

Browsers enforce the same-origin policy: JavaScript on https://app.example.com cannot read responses from a different origin (scheme + host + port), such as https://api.example.com, unless that server allows it.

CORS (Cross-Origin Resource Sharing) is how the server grants permission, using response headers such as:

text
Access-Control-Allow-Origin: https://app.example.com
Access-Control-Allow-Methods: GET, POST, PATCH, DELETE
Access-Control-Allow-Headers: Content-Type, Authorization
Access-Control-Allow-Credentials: true

For non-simple requests (for example JSON bodies or an Authorization header) the browser first sends a preflight OPTIONS request.

Fix it on the server, not in the frontend: in Laravel, set allowed_origins in config/cors.php. Avoid * when cookies or credentials are involved; browsers reject that combination anyway. CORS is enforced by browsers only; Postman and server-to-server calls ignore it.