Sobes.tech

Implement a simple slot machine "one-armed bandit": - Implement three reels (with digits from 0 to 9, changing sequentially 0,1,2,...9,0,1,2...) - Each onRoll on the reel yields the next value - If all three digits match after stopping - we say that the player wins - Disable the button during spinning The physical model of the wheel is already implemented in the runSpinner method, but it doesn't mean anything about the digits. Tip: start implementation with the first reel, then add the others similarly.

156

What will 'this' be inside a function if called with 'call' without passing a context - in strict mode and without?

156

Tell me how the Event Emitter pattern works and if you have encountered it, particularly in Angular.

156

Is Observable synchronous or asynchronous?

155

Why is the victory counted incorrectly even if the values on the drums are different? Understand the cause of the bug related to asynchronous state update (state race condition).

154

What problems does dependency injection solve in Angular and what are the advantages of providing services at the application and component levels?

154

Given three new types. You need to create a new generic type that will contain all the fields of these types (using union).

151

Explain the difference between cold and hot Observables.

150

Break down the application according to the Feature-Sliced Design (FSD) architecture — describe the layers App, Pages, Widgets, Features, Entities.

149

Try to mock a situation where all three numbers on the reels match, and check that a victory message is displayed.

148

React task (3 sub-tasks): 1) Fix the user edit form — clicking on a username in the list should populate the input form with that name. 2) The edit form should not re-render when typing in the search field (optimization with React.memo). 3) When selecting a user from the list, the search field should reset.

148

The function simulates the rotation of a drum with a gradual stop - use onRoll for the rotation animation (changing the current value on the drum) - and onStop to notify when the drum has finished spinning example runSpinner( () => setValue(v => ++v % 10), () => console.log('finished') )

148

You are given an array a, consisting of n positive integers. Are there three distinct indices i, j, k such that the sum a[i]+a[j]+a[k] ends with the digit m? For example, for m = 3 solve([20, 22, 19, 84]) => true // 20 + 84 + 19 = 123 solve([1,2,3]) => false

147

What is the Awaited utility type in TypeScript?

147

What is the difference between ChangeDetectorRef.markForCheck() and detectChanges()?

145

What will change in the type logic if you replace 'extends' with '=' (set a default value for the generic)?

143

Fix the code so that clicking the button rerenders only App, and entering text in input — only Parent (without unnecessary rerenders of Child).

143

Are you familiar with Web Vitals metrics? How can CLS (Cumulative Layout Shift) be improved?

141

Regarding databases — why did you choose IndexedDB for local storage instead of something else? What are the alternatives?

140

What will change in the type logic if you replace `extends` with `=` (set a default value for the generic)?

139
/5