For a code snippet with a function call before its assignment to a variable, for example var foo = function () {}, determine the execution result and explain hoisting.
Frontend
How would you organize style isolation for each micro-frontend, including when using Tailwind CSS? What browser approaches for isolation exist?
Implement your own utility type Pick<T, K>. Explain how mapped types work and how to implement an equivalent of Partial<T>.
How does display: none differ from opacity: 0 in terms of render tree, layout, and occupied space? Which option is more performant and why?
How have you worked with React: which versions have you encountered and have you used class components? How do class components differ from functional ones?
If an object is created using Object.create([object]), what will its __proto__ point to?
What does the render tree include? Which elements are considered hidden?
For the Promise.resolve(1).then(() => { throw 2 }).then(...).catch(x => console.log(x)).then(x => console.log(x)), determine what will be in the last console.log, and explain why.
Does the value [object] have a prototype? How does __proto__ differ from prototype? What does __proto__ of an object point to? Is it true that __proto__ exists on all values?
What does useMemo do and what are the consequences of using it for all values unnecessarily?
Please tell us about yourself and your last project: what you worked on and what difficult or interesting cases you encountered?
For a code snippet with reduce and an initial accumulator of 10, determine what console.log will output.
If the loadRolesData function returns a Promise, what will be the value after its call? Is it possible to store a Promise in a state intended for data, and how to fix this?
For a recursive call of a function inside a Promise handler, determine the order of execution and explain whether it will result in an infinite loop.
What is the name of the check like if ('payload' in data), used for narrowing the type?
For a for loop with var and setTimeout, determine what will be output. How to modify the code so that with var, the values 1, 2, 3 are output, rather than the final counter value?
For a code fragment with the array [1, 2, 3], calls to map(item => item * 2) and filter(item => item > 3), determine what console.log will output. Do map and filter mutate the original array?
What is the name of and how is the approach implemented, where the same input data results in sending one request instead of multiple identical ones?
What is the difference between interface and type in TypeScript?
What is the difference between a regular script, a script with async, and a script with defer? If there are multiple script tags on a page, in what order will they load and execute?