Telegram Group & Telegram Channel
🎙 Собеседование в OZON Tech на позицию Middle Frontend Разработчик

Два этапа тех собесов с задачами и вопросами. Вопросы были разнообразные: http, cors, browser и тд.

1. Переписать функцию с помощью async/await

getJson('json/1')
.then(json => {
if(json.key) {
return getJson('json/2')
}
throw new Error('No key')
})
.then(json => {
return json.key2
})
.catch(e => {
console.log(e)
})


2. Написать обертку вокруг нативного fetch, которая будет в случае ошибки пробовать еще retriesCount раз, и только потом упадет с ошибкой

function fetchWithRetries(retriesCount, ...fetchArgs) {
/* */
}



3. Типизировать функцию reduce чтобы она принимала дженерики:
function reduce(array, callback, initial) {
let acc = initial

for(let i = 0; i < array.length; i++) {
acc = callback(acc, array[i], i)
}

return acc
}


4. Написать функцию которая сворачивает диапазоны:
compress([1, 4, 3, 2]) // '1-4'

compress([1, 4]) //'1, 4'


5. Реализовать паттерн наблюдатель:
class Store {
/* */
}

const store = new Store()

const firstSubscriber = (data) => console.log('first', data)
const secondSubscriber = (data) => console.log('second', data)

store.subscribe(firstSubscriber)
store.subscribe(secondSubscriber)

store.data = {newKey: 'newString'}

/** CONSOLE
* first {newKey: 'newString'}
* second {newKey: 'newString'}
*/

store.unsubsribe(firstSubscriber)

/** CONSOLE
* second {newKey: 'newString'}
*/
}


#interview #frontend
Please open Telegram to view this post
VIEW IN TELEGRAM



group-telegram.com/reactify_IT/1397
Create:
Last Update:

🎙 Собеседование в OZON Tech на позицию Middle Frontend Разработчик

Два этапа тех собесов с задачами и вопросами. Вопросы были разнообразные: http, cors, browser и тд.

1. Переписать функцию с помощью async/await


getJson('json/1')
.then(json => {
if(json.key) {
return getJson('json/2')
}
throw new Error('No key')
})
.then(json => {
return json.key2
})
.catch(e => {
console.log(e)
})


2. Написать обертку вокруг нативного fetch, которая будет в случае ошибки пробовать еще retriesCount раз, и только потом упадет с ошибкой

function fetchWithRetries(retriesCount, ...fetchArgs) {
/* */
}



3. Типизировать функцию reduce чтобы она принимала дженерики:
function reduce(array, callback, initial) {
let acc = initial

for(let i = 0; i < array.length; i++) {
acc = callback(acc, array[i], i)
}

return acc
}


4. Написать функцию которая сворачивает диапазоны:
compress([1, 4, 3, 2]) // '1-4'

compress([1, 4]) //'1, 4'


5. Реализовать паттерн наблюдатель:
class Store {
/* */
}

const store = new Store()

const firstSubscriber = (data) => console.log('first', data)
const secondSubscriber = (data) => console.log('second', data)

store.subscribe(firstSubscriber)
store.subscribe(secondSubscriber)

store.data = {newKey: 'newString'}

/** CONSOLE
* first {newKey: 'newString'}
* second {newKey: 'newString'}
*/

store.unsubsribe(firstSubscriber)

/** CONSOLE
* second {newKey: 'newString'}
*/
}


#interview #frontend

BY Reactify | Frontend Разработка


Warning: Undefined variable $i in /var/www/group-telegram/post.php on line 260

Share with your friend now:
group-telegram.com/reactify_IT/1397

View MORE
Open in Telegram


Telegram | DID YOU KNOW?

Date: |

I want a secure messaging app, should I use Telegram? The SC urges the public to refer to the SC’s I nvestor Alert List before investing. The list contains details of unauthorised websites, investment products, companies and individuals. Members of the public who suspect that they have been approached by unauthorised firms or individuals offering schemes that promise unrealistic returns Although some channels have been removed, the curation process is considered opaque and insufficient by analysts. "Russians are really disconnected from the reality of what happening to their country," Andrey said. "So Telegram has become essential for understanding what's going on to the Russian-speaking world." In this regard, Sebi collaborated with the Telecom Regulatory Authority of India (TRAI) to reduce the vulnerability of the securities market to manipulation through misuse of mass communication medium like bulk SMS.
from us


Telegram Reactify | Frontend Разработка
FROM American