Sobes.tech

Why did promises appear if asynchronous operations could be organized using generators? What was inconvenient about the callback approach?

Middle+
3

What are you currently working on?

Middle+
2

In what cases will fetch execution go into catch? How to determine if the request was successful or not, and where does the HTTP status come from?

Middle+
2

What do you know about the order of script connection and execution: regular script, async, and defer?

Middle+
2

What is CORS and what are the options for solving cross-domain request issues?

Middle+
2

What are the ways to bypass subscribers stored in a Set?

Middle+
2

Type your array transformation function in TypeScript: define the necessary generic types for the element type of the source array and the result type.

Middle+
2

Implement a function memo(fn, lifetime) that returns a new function and caches the result of the original function without arguments for a specified lifetime in milliseconds. It should cache only the last result, without keys and Map; a repeated call within the lifetime should return the cached result.

Middle+
2

Implement a class in TypeScript following the 'Observer' pattern: it stores data in an object, allows subscribing and unsubscribing via subscribe/unsubscribe, and notifies subscribers upon data change through assignment. Include getter and setter; initial value should be an empty object.

Middle+
2

Describe the stages of page rendering in the browser: DOM, CSSOM, render tree, layout/reflow, repaint, and compositing. Which properties are preferable to animate and why?

Middle+
1

Implement an asynchronous task queue with concurrency limit: tasks are first added to the queue, then started by the loop method; no more than a specified number of tasks should run simultaneously. When all queued and running tasks are finished, notify about queue completion.

Middle+
1

Implement a function that retries fetch requests several times upon failure. What should happen after exhausting attempts?

Middle+
1

What happens in the browser after entering a URL?

Middle+
1

How can a task queue be implemented using promises without flags and counters? What is a worker in the context of such a queue?

Middle+
1