Do you have experience in independently designing the architecture of a service or its part?
Frontend
Tell me about your experience writing tests
// Implement the groupBy method that extends the standard array methods. // The method should return a grouped version of the array – an object, // where each key is the result of the function fn(arr[i]), // and each value is an array containing all elements of the original array with this key.
Have you worked with databases? If yes, which ones? What exactly did you do with them?
Have you engaged in server-side rendering (SSR)?
/* We have a set of tickets of the following form: [ { from: 'London', to: 'Moscow' }, { from: 'NY', to: 'London' }, { from: 'Moscow', to: 'Spb' }, ... ] From these tickets, a single continuous route can be constructed. There are no loops or repetitions in the route. Write a program that returns these ticket objects in the order of the route. */ function getRoute(tickets = [], startCity = 'NY') { // your code here }
/** * The function `asyncAuth(callback)` accepts a callback, which can * be passed an error (as the first argument) and data * from the backend (as the second argument). * asyncAuth((error, data) => {}); * * You need to implement the `auth()` function, * which calls `asyncAuth()`, but returns a Promise. * * @returns {Promise} */ export function auth() { // asyncAuth((error, data) => {}); } /** * The function `tryAuth()` uses `auth()` and, in case of an error, * makes N additional attempts. * If all attempts fail - throw the last error * * @returns {Promise} */ export function tryAuth(n) { }