Q741. What is the difference between const and Object.freeze?
The main difference is that `const` applies to **variables** (bindings), while `Object.freeze()` applies to **values** (objects). 1. **`const`**: Prevents the reassignmen...
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).
The main difference is that `const` applies to **variables** (bindings), while `Object.freeze()` applies to **values** (objects). 1. **`const`**: Prevents the reassignmen...
`Promise.any()` is a Promise combinator method introduced in ES2021 that takes an iterable of promises and returns a single promise that fulfills as soon as any of the in...
`BigInt` is a built-in JavaScript object (introduced in ES2020) that provides a way to represent whole numbers larger than 2^53 - 1 (the largest number JavaScript can rel...
Private class fields (introduced in ES2022) are class properties that are only accessible within the class itself. They are prefixed with a hash symbol (`#`) and provide ...
The `at()` method (introduced in ES2022) allows you to access array elements using both positive and negative indices. It provides a simpler and more intuitive way to acc...
Top-level await is a feature (introduced in ES2022) that allows you to use the `await` keyword at the top level of ES modules, outside of async functions. This enables mo...
`WeakRef` and `FinalizationRegistry` are advanced features (introduced in ES2021) for managing memory and object lifecycles in JavaScript. They provide low-level control ...
Logical assignment operators (introduced in ES2021) combine logical operations (`&&`, `||`, `??`) with assignment (`=`). They provide a concise way to assign values based...
The Temporal API is a modern proposal (Stage 3) to replace JavaScript's problematic `Date` object. It provides a better, more intuitive way to work with dates and times i...
Both are used to iterate over arrays, but they differ in performance, flexibility, and purpose. The `for` loop is a core JavaScript statement that gives you full control ...
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.