# Skyeng Middle JS developer #1
Привет!
Решение необходимо оформить в виде ссылки на Google Doc. В него нужно собрать все ответы и ссылки. Пожалуйста, используй Stackblitz (Share - Editor Url). Для решения задач используй TypeScript 3+ (**покажи что ты знаешь что такое TypeScript**).
**Не трать время на HTML/CSS, внешний вид не важен и не влияет на результат.**
Предоставление решения в правильном виде — один из критериев оценки.
Подпиши, пожалуйста, сколько ушло времени на выполнение. Мы не учитываем время при оценке, оно нужно нам для статистики.
Удачи :wink:
## Тестовое задание
Напиши сервис, подсчитывающий навыки, развиваемые во время урока. Источник данных для сервиса - это объект в отдельном JSON файле.
Оригинальная структура JSON содержит много лишних полей, так что придется упростить ее до необходимой для выполнения задания (необходимые данные выбираешь сам, руководствуясь опытом и здравым смыслом), а так же упорядочить шаги урока (**steps**) по акцентированности шага (чем больше значений в **emphasis** тем менее акцентированный шаг) и свойству **order** в порядке возрастания.
В массиве **steps** находится список "шагов" урока.
В поле **emphasisDistribution** - список развиваемых на уроке навыков. Цифра привязанная к навыку это процентное соотношение развиваемого навыка относительно остальных. Учти что не все шаги могут быть выполнены во время урока, за это отвечает свойство **completed**
Реализуй два метода которые будут расчитывать развитие произвольно заданных навыков для пройденных и не пройденных шагов урока.
Развитие навыка за урок это отношение всех значений этого навыка к количеству шагов.
Результатом твоего задания должен быть вывод в консоль расчета развития следующих навыков: для выполненных во время урока шагов - **vocabulary**, **speaking**, **reading**; для не выполненных - **reading**, **grammar**, **vocabulary**.
Формат вывода - `{[name: sting]: value: number}`
```json=
{
"info": {
"id": 4109,
"lessonRevId": 938193,
"sortOrder": 2,
"title": "\u041e \u0447\u0435\u043c \u043f\u043e\u0435\u0442 Linkin Park",
"unit": "",
"tags": "",
"grammar": "",
"image": "https:\/\/user73866.clients-cdnnow.ru\/image\/lesson\/149db3b30daf30b42ca52c34265f463c.jpg",
"programId": 126,
"program": "Public lessons",
"level": 3,
"levelText": "Pre-Intermediate",
"ageLimit": 0,
"subject": 0,
"section": "Section 1",
"plot": "",
"video": null,
"bookmarkedByIds": [],
"categories": null,
"customCategories": null,
"customMessages": {
"66": "",
"33": "",
"0": ""
},
"nextLesson": null,
"isIllegal": false,
"type": "general",
"homeworkReleased": false,
"testReleased": false,
"preparationStepsCount": 0,
"companiesWhite": false,
"companies": [],
"circlesWhite": [],
"circlesBlack": [],
"isForKids": false,
"isTrial": false
},
"plan": {
"steps": [
{
"id": 415674,
"stepId": 36189,
"stepUUID": "81d7c26e-c7fa-46c8-87e3-497bfba57145",
"lessonId": 4109,
"emphasis": ["vocabulary", "grammar"],
"emphasisId": 6,
"color": "#48CFAD",
"title": "Keep kind",
"section": null,
"typeText": "Vocabulary task",
"typeDesc": "Vocabulary",
"time": 0,
"completed": true,
"isInteractive": true,
"emphasisDistribution": {
"reading": 0,
"writing": 0,
"listening": 0,
"speaking": 0,
"grammar": 10,
"vocabulary": 90,
"pronunciation": 0,
"spelling": 0
},
"exercises": [
"drag word to image set"
],
"requiredFields": [],
"order": 4
},
{
"id": 415677,
"stepId": 36190,
"stepUUID": "7b9dcf36-0b52-4368-9007-6ca14ecb3124",
"lessonId": 4109,
"emphasis": ["vocabulary", "reading"],
"emphasisId": 6,
"color": "#48CFAD",
"title": "Lyrics",
"section": null,
"typeText": "Vocabulary task",
"typeDesc": "Vocabulary, reading",
"time": 0,
"completed": false,
"isInteractive": true,
"emphasisDistribution": {
"reading": 40,
"writing": 0,
"listening": 0,
"speaking": 0,
"grammar": 0,
"vocabulary": 60,
"pronunciation": 0,
"spelling": 0
},
"exercises": [
"dnd text"
],
"requiredFields": [],
"order": 5
},
{
"id": 415675,
"stepId": 36204,
"stepUUID": "fcf65a40-72dd-4eb3-9adb-2a49e556b917",
"lessonId": 4109,
"emphasis": ["grammar", "vocabulary", "reading"],
"emphasisId": 5,
"color": "#FC6E51",
"title": "Neither do I",
"section": null,
"typeText": "Grammar task",
"typeDesc": "Grammar, vocabulary, reading",
"time": 0,
"completed": false,
"isInteractive": true,
"emphasisDistribution": {
"reading": 20,
"writing": 0,
"listening": 0,
"speaking": 0,
"grammar": 60,
"vocabulary": 20,
"pronunciation": 0,
"spelling": 0
},
"exercises": [
"select"
],
"requiredFields": [],
"order": 1
},
{
"id": 415635,
"stepId": 36180,
"stepUUID": "81d7c26e-c7fa-46c8-87e3-497bfba57145",
"lessonId": 4109,
"emphasis": ["speaking", "listening", "pronunciation"],
"emphasisId": 6,
"color": "#48CFAD",
"title": "Keep kind",
"section": null,
"typeText": "Speaking task",
"typeDesc": "Speaking",
"time": 0,
"completed": true,
"isInteractive": true,
"emphasisDistribution": {
"reading": 0,
"writing": 0,
"listening": 20,
"speaking": 50,
"grammar": 0,
"vocabulary": 0,
"pronunciation": 20,
"spelling": 0
},
"exercises": [
"select"
],
"requiredFields": [],
"order": 3
},
{
"id": 415644,
"stepId": 36119,
"stepUUID": "81d7c26e-c7fa-46c8-87e3-497bfba57146",
"lessonId": 4109,
"emphasis": ["vocabulary"],
"emphasisId": 6,
"color": "#48CFAD",
"title": "Keep kind",
"section": null,
"typeText": "Vocabulary task",
"typeDesc": "Vocabulary",
"time": 0,
"completed": false,
"isInteractive": true,
"emphasisDistribution": {
"reading": 0,
"writing": 0,
"listening": 0,
"speaking": 0,
"grammar": 0,
"vocabulary": 100,
"pronunciation": 0,
"spelling": 0
},
"exercises": [
"drag word to image set"
],
"requiredFields": [],
"order": 6
},
{
"id": 415604,
"stepId": 36225,
"stepUUID": "81d7c26e-c7fa-46c8-87e3-497bfba57787",
"lessonId": 4109,
"emphasis": ["speaking"],
"emphasisId": 6,
"color": "#48CFAD",
"title": "Keep kind",
"section": null,
"typeText": "Speaking task",
"typeDesc": "Speaking",
"time": 0,
"completed": true,
"isInteractive": true,
"emphasisDistribution": {
"reading": 0,
"writing": 0,
"listening": 0,
"speaking": 100,
"grammar": 0,
"vocabulary": 0,
"pronunciation": 0,
"spelling": 0
},
"exercises": [
"select"
],
"requiredFields": [],
"order": 2
}
]
},
"shareImage": "\/image\/lessonShare\/47d7967106e0e8ac34d4559a670c59df.jpg",
"aims": [],
"achievements": [],
"isContentEncrypted": true
}
```