Have you worked with Lighthouse? Suppose you are tasked with improving the FCP (First Contentful Paint) metric. What ideas come to mind?
Frontend
Look at this piece of code — understand what it does, and write a simple example of its usage. There is also a similar helper in lodash.
const customMap = (array, transform) => { // something like array.map(transform); }; const stringResults = customMap([1, 2, 3], item => item.toString()); const lengths = customMap(["hello", "world"], item => item.length);
What problems exist in the current approach to SSR Data Loading, and how will they grow with the addition of new pages?
What do you like most and least about your work? What takes more time than you'd like?
Implement a function foo that takes an array and returns an object where the keys are the elements of the array and the values are all 0.
How do you develop yourself, learn new technologies, and what was the last thing you remembered?
At what point will you report that you are behind schedule?
What can happen on the server during HTML (SSR) generation — what does the server spend time on, what can be problems with performance and security during data serialization?
Define the order of console output for code with setTimeout, Promise, then, catch, finally, and various synchronous calls (Event Loop task).
Tell me, what interesting and new have you learned recently in the world of frontend?
Tell about your last workplace and the projects you worked on.
What is the difference between using hasOwnProperty and directly checking the value through a condition (if o[x])? What happens if the property value is false?
What improvements could be made to enhance product quality in the future?
How can modern image formats (WebP, AVIF) be supported in browsers that do not support them?
What is React.lazy? What benefits does it provide and how does it work under the hood?
Implement a memoize function that caches the results of asynchronous function calls and does not send a duplicate request if a call with the same arguments has already been made.
You need to write a function memoize — a wrapper for memoization. For simplicity, you can assume that the function will always have only one argument, and it will be a primitive value.
<script> function sum(valueA) { throw 'Not implemented' } console.log(sum(1)()); // 1 console.log(sum(1)(2)()); // 3 console.log(sum(1)(2)(-3)()); // 0 </script>
There is a function customMap, which does almost the same as the usual array map, but it is not typed. You need to type it so that on the fifth line there is an array of strings, and on the seventh — an array of numbers.