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: |

Continuing its crackdown against entities allegedly involved in a front-running scam using messaging app Telegram, Sebi on Thursday carried out search and seizure operations at the premises of eight entities in multiple locations across the country. But because group chats and the channel features are not end-to-end encrypted, Galperin said user privacy is potentially under threat. The Dow Jones Industrial Average fell 230 points, or 0.7%. Meanwhile, the S&P 500 and the Nasdaq Composite dropped 1.3% and 2.2%, respectively. All three indexes began the day with gains before selling off. "The argument from Telegram is, 'You should trust us because we tell you that we're trustworthy,'" Maréchal said. "It's really in the eye of the beholder whether that's something you want to buy into." In February 2014, the Ukrainian people ousted pro-Russian president Viktor Yanukovych, prompting Russia to invade and annex the Crimean peninsula. By the start of April, Pavel Durov had given his notice, with TechCrunch saying at the time that the CEO had resisted pressure to suppress pages criticizing the Russian government.
from sg


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