Q951. How do you implement a custom error class in JavaScript?
Custom error classes allow you to create specific error types with additional properties and methods, making error handling more precise. **Basic custom error:** ```javas...
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 (1,100 available).
Custom error classes allow you to create specific error types with additional properties and methods, making error handling more precise. **Basic custom error:** ```javas...
Synchronous and asynchronous generators differ in how they produce values and handle asynchronous operations. **Synchronous generator:** ```javascript function* syncGener...
Proxy traps are handler methods that intercept fundamental operations on objects, allowing you to customize their behavior. **Available traps:** ```javascript const handl...
The MutationObserver API provides a way to watch for changes to the DOM tree, replacing the deprecated mutation events. **Basic usage:** ```javascript const observer = ne...
Tail call optimization (TCO) is a technique where a function call in tail position (the last operation before returning) reuses the current stack frame instead of creatin...
Circular references occur when an object references itself directly or indirectly, causing `JSON.stringify()` to throw an error. **Problem:** ```javascript const obj = { ...
The singleton pattern ensures a class has only one instance and provides a global access point to it. **Classic singleton with closure:** ```javascript const Singleton = ...
The Performance API provides high-precision timing information for measuring web application performance. **Basic timing:** ```javascript // High-resolution timestamp con...
SharedArrayBuffer and ArrayBuffer are both fixed-length binary data buffers, but SharedArrayBuffer allows sharing memory between multiple workers/threads. **ArrayBuffer (...
Prototype pollution is a security vulnerability where attackers inject properties into Object.prototype, affecting all objects in the application. **Vulnerable code:** ``...
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.