Sobes.tech

Tell me about the Event Loop in JavaScript: what does it consist of and in what order are synchronous code, microtasks, and macrotasks executed?

311

Have you ever used call, apply, and bind methods? Explain their purpose and differences.

232

You have a ready desktop-only web application for CRM/Service Desk that looks bad on mobile devices. The mobile version design is already prepared and significantly differs from the desktop version. How would you organize adaptation of the application for mobile browsers?

228

How reliably can you determine whether the application is opened on a mobile device or on a desktop to choose the appropriate interface version?

226

Why is DI necessary in Angular if dependencies can be created with new or stored in global state?

214

You are a tech lead of a team of 3-4 frontend developers. A new large-scale CRM or Service Desk web product with a ready backend has appeared. How will you choose the technology for the frontend part?

212

What will the component render if the decorator specifies template: './user.component.html' instead of templateUrl? Is such a record valid?

209

Explain the problem with the following Angular component code and how you would fix it: ```typescript @Component({ selector: 'app-user', template: './user.component.html', stylesUrls: './user.component.scs', changeDetection: ChangeDetectionStrategy.OnPush, }) export class CmfUserComponent { users$: any; constructor() { const api = new BackendService(); this.users$ = api.getUsers(); } } ```

207

If different sets of components are used for desktop and mobile versions, but the services are shared, how to organize switching between versions?

206

How good is the practice of subscribing to an Observable directly in Angular component code? What are the risks and alternatives?

200

How justified is a complete rejection of NgModule in new Angular projects? In which cases might modules still be needed?

168

Tell me about the keyword this in JavaScript: what does its value depend on when calling a function? What are the features of arrow functions?

156

Have you ever used DI decorators like @Optional, @Self, @SkipSelf, and @Host? Explain how they influence dependency search in the hierarchy of injectors.

145

What is the difference between where a function is declared and where it is called, in the context of the value of this?

134

What are the advantages of the inject() function in Angular compared to dependency injection via constructor?

125

If you declare a function inside another function, what will it have access to? How will this work with this in a nested regular function?

108

What is change detection in Angular? How do the Default and OnPush strategies differ, and when is a component with OnPush checked?

104

Is it permissible to assign an Observable directly to a component field in the constructor or at field initialization? What is the difference from subscribing in the constructor?

93

At what levels can services be provided via providers in Angular: component, route, module, application, platform?

84
/2