Task: implement the function calculateStats to compute the sum and average of an array of numbers. Consider the case with an empty array.
Frontend
There are three nested components: server (div), client (div), server (button). What HTML will come from Next.js before hydration?
Tell about your development experience starting from your last job.
What is a closure? Provide an example.
What is debounce?
How to prevent flickering of the interface caused by useEffect?
What goes into the microtask queue? Name browser Observer APIs besides MutationObserver.
What is a server component and a client component in Next.js? How is a client component declared? Is it possible to embed a server component into a client component and vice versa?
Tell me, what is Module Federation and what does it include?
//Implement the function // promiseAllLimit(tasks: Array<() => Promise<unknown>>, limit: number): Promise<any[]>, //which executes promises with a limit on the maximum number of concurrent requests.
Task: implement a function to group users by city (groupByCity).
You used FSD — who designed the domain areas? Were they just new folder names or a deeper architectural approach? What was inside the entities folder?
How do you solve cross-browser compatibility issues? How can you tell in advance if a CSS property will work in the target browsers?
//Implement a debounce function: delay the execution of a function until a specified time has passed //example const debouncedSearch = debounce((query) => { console.log('Searching for:', query); }, 300); debouncedSearch('a'); debouncedSearch('ab'); debouncedSearch('abc'); // Will only execute once with 'abc' after 300ms of the last call
When you connect an Observer, how do you disable it when it becomes unnecessary?
What is your experience with CSS, layout — did you start directly with React or was there a foundation in pure CSS/HTML?
How did you connect a separate repository with shared components to another project — as a package or otherwise?
What rendering strategies exist? Tell me about CSR, SSR, SSG.
What is the Event Loop?
What is the difference between Set and a regular array? What is the complexity of the has() operation in Set?