Q11. How do CommonJS and ES modules differ?
CommonJS is Node's original system: require() is a function executed at runtime, module.exports is a mutable object, resolution can be dynamic and conditional, and module...
Technical Question Bank · Peer-Reviewed
Search and filter frequently asked interview questions across technical, programming, and behavioral domains. Tailor your interview preparation by difficulty for freshers or experienced developers (780 available).
CommonJS is Node's original system: require() is a function executed at runtime, module.exports is a mutable object, resolution can be dynamic and conditional, and module...
Dynamic segments use bracket folders: app/blog/[slug]/page.tsx receives params as a prop, which is a Promise in recent versions. Catch-all routes use [...slug] and option...
The `slice()` method in JavaScript is used to extract a section of an array, returning a new array containing the selected elements. It does not modify the original array...
Route Handlers live in app/api/.../route.ts and export HTTP-method functions such as GET, POST, PUT, DELETE and PATCH. They receive a standard Request and return a Respon...
The `splice()` method in JavaScript is used to add, remove, or replace elements within an array. Unlike `slice()`, which creates a shallow copy and does not alter the ori...
You export a static metadata object or a generateMetadata async function from a layout or page. It can set title, description, canonical URL, Open Graph, Twitter cards an...
Here are the key differences between `slice()` and `splice()` methods in JavaScript arrays: | `slice()` | `splice()` | | -------------------------------------------------...
Middleware in middleware.ts at the project root runs before a request is completed, on the Edge runtime, and can rewrite, redirect, set headers or return a response direc...
**Objects** and **Maps** both allow you to associate keys with values, retrieve those values, delete keys, and check if a key exists. Historically, Objects have been used...
Next.js has several cache layers. The Data Cache stores individual fetch results and can be tagged. The Full Route Cache stores rendered HTML and RSC payloads for static ...
HireXTech uses essential storage to remember your study preferences and third-party advertising cookies via Google AdSense in compliance with GDPR. You can choose to enable essential cookies only or accept all cookies. Read our Privacy Policy.