Q941. How do you return all matching strings against a regular expression?
The `matchAll()` method can be used to return an iterator of all results matching a string against a regular expression. For example, the below example returns an array o...
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,236 available).
The `matchAll()` method can be used to return an iterator of all results matching a string against a regular expression. For example, the below example returns an array o...
All three render an anchor tag in the DOM, but they behave very differently when clicked: | Aspect | `` | `` | `` | | --- | --- | --- | --- | | Navigation | Full page rel...
The `trim` method of string prototype is used to trim on both sides of a string. But if you want to trim especially at the beginning or ending of the string then you can ...
A protected (or private) route only renders its content when the user meets some condition (usually "is authenticated"), otherwise it redirects them elsewhere (e.g., to `...
Let's take console statement with unary operator as given below, ```javascript console.log(+"Hello"); // NaN ``` The output of the above console log statement returns NaN...
React Router matches routes top-to-bottom/most-specific-first, so a catch-all route with `path="*"` placed last will match any URL that didn't match an earlier route — th...
JavaScript does not have built-in support for mixins as a formal language feature. However, developers commonly implement mixins using various patterns to enable code reu...
Starting with React Router v6.4, the library ships **data APIs** (`createBrowserRouter`, `loader`, `action`, `useLoaderData`, `useActionData`, `useFetcher`) that move dat...
```javascript // Define a mixin const canEat = { eat() { console.log("Eating..."); } }; const canWalk = { walk() { console.log("Walking..."); } }; const canRead = { read(...
Query (search) parameters are the `?key=value&key2=value2` portion of a URL. Unlike route params (see [What are dynamic routes and what are route parameters?](#what-are-d...
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.