Q521. What is an enum?
An enum is a type restricting variables to one value from a predefined set of constants. JavaScript has no enums but typescript provides built-in enum support. ```javascr...
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).
An enum is a type restricting variables to one value from a predefined set of constants. JavaScript has no enums but typescript provides built-in enum support. ```javascr...
You can use the `Object.getOwnPropertyNames()` method which returns an array of all properties found directly in a given object. Let's see the usage of this in an example...
You can use the `Object.getOwnPropertyDescriptors()` method which returns all own property descriptors of a given object. The example usage of this method is below, ```ja...
A property descriptor is a record which has the following attributes 1. `value`: The value associated with the property 2. `writable`: Determines whether the value associ...
The `extends` keyword is used in class declarations/expressions to create a class which is a child of another class. It can be used to subclass custom classes as well as ...
The `window.location.href` property will be helpful to modify the url but it reloads the page. HTML5 introduced the `history.pushState()` and `history.replaceState()` met...
The `Array#includes()` method is used to determine whether an array includes a particular value among its entries by returning either true or false. Let's see an example ...
You can use length and every method of arrays to compare two scalars (compared directly using `===`) arrays. The combination of these expressions can give the expected re...
Yes, multiple useEffect hooks are allowed and recommended when you want to separate concerns. ```jsx useEffect(() => { // Handles API fetch }, []); useEffect(() => { // H...
The `new URL()` object accepts the url string and `searchParams` property of this object can be used to access the get parameters. ```javascript let urlString = "http://w...
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.