Repository: BorodinaEvg/aqa_course_hw_unit_tests
Pull request #1: HW3 - HW9
Author: login: BorodinaEvg
Created: 2025-03-12T20:47:25Z | Merged: 2025-03-19T08:40:50Z


![hw 5 task 2](https://github.com/user-attachments/assets/1364562b-0f33-449d-8c74-a14f0a9396b3)
![hw 6 task 1](https://github.com/user-attachments/assets/38a156ca-462a-4176-8b6d-73f09ea263d3)
![hw 6 task 2](https://github.com/user-attachments/assets/6af84393-9b5a-4995-9d06-2d982fefedaa)
![hw 7 task 1](https://github.com/user-attachments/assets/9c9f16a7-e688-483a-a418-f7275a7fc55a)
![hw 7 task 2](https://github.com/user-attachments/assets/0e9991d5-d905-45cb-9172-87967b125eaf)
![hw 8 task 1](https://github.com/user-attachments/assets/5a6b9f4c-c7de-4190-95f4-c7baaebf0cf2)
![hw 8 task 2](https://github.com/user-attachments/assets/e9e1b4fb-bd88-45a5-9b09-a5490833b36f)
![hw5 task 1](https://github.com/user-attachments/assets/04c83a58-ba6d-486f-a413-3c1bd42b3305)






Diff:
diff --git a/homework-solutions/js/hw-3/task-1.js b/homework-solutions/js/hw-3/task-1.js
index 15a03bbe..b6950cd2 100644
--- a/homework-solutions/js/hw-3/task-1.js
+++ b/homework-solutions/js/hw-3/task-1.js
@@ -51,3 +51,31 @@
 25. Вывести в консоль тип данных item_7 в виде ——  “item_7 == ”  item_7,  “item_7_type == ”  item_7_type ——  
 
 */
+
+let item_1;
+item_1 = 5;
+console.log(item_1)
+
+let item_2;
+item_2 = 3;
+console.log(item_2)
+let item_3;
+item_3 = item_1 + item_2;
+console.log(item_3);
+let item_4;
+item_4 = "Hello World";
+console.log(item_4);
+console.log(item_3 + item_4);
+console.log(item_3 * item_4);
+let item_5;
+item_5 = item_3;
+let item_6;
+let item_6_type;
+item_6 = 15;
+item_6_type = typeof(item_6);
+console.log("item_6 == " +item_6, "item_6_type == " +item_6_type);
+let item_7 = String(item_6);
+let item_7_type;
+item_7_type = typeof(item_7);
+console.log("item_7 == " + item_7, "item_7_type == " + item_7_type);
+    
diff --git a/homework-solutions/js/hw-3/task-2.js b/homework-solutions/js/hw-3/task-2.js
index 47a8c49f..353f0d6c 100644
--- a/homework-solutions/js/hw-3/task-2.js
+++ b/homework-solutions/js/hw-3/task-2.js
@@ -4,3 +4,11 @@
 n + nn + nnn, где n не перемножаются, а конкатенируются
 
 */
+
+const num1to9 = '1'
+const n = +num1to9
+console.log(n)
+
+const summaN = n + +('' + n + n) + +('' + n + n + n); // складываем, преобразуя значения в переменных
+console.log(summaN); 
+
diff --git a/homework-solutions/js/hw-4/task-1.js b/homework-solutions/js/hw-4/task-1.js
index 8c209425..194da7c8 100644
--- a/homework-solutions/js/hw-4/task-1.js
+++ b/homework-solutions/js/hw-4/task-1.js
@@ -3,3 +3,25 @@
  - Создайте переменную salary со значением 1000
   - Создайте переменную grade, которая должна получить значение "middle" если salary больше или равна 1000, и значение "junior" - если меньше
   */
+
+  let salary = 1000;
+  let grade;
+
+  
+  
+  if (salary >= 1000) {
+    grade = "middle";
+  } else if (salary < 1000) {
+    grade = "junior";
+  }
+
+  console.log (grade);
+  
+
+  salary >= 1000 ? grade = "middle" : grade = "junior"; // тернарный оператор
+
+  console.log (grade)
+ 
+
+
+ 
\ No newline at end of file
diff --git a/homework-solutions/js/hw-4/task-2.js b/homework-solutions/js/hw-4/task-2.js
index 7ee68ce6..07836d0f 100644
--- a/homework-solutions/js/hw-4/task-2.js
+++ b/homework-solutions/js/hw-4/task-2.js
@@ -14,3 +14,24 @@
   5. Проверить задание со следующими значениями в переменной age: 10, 17, 18, 19, 59, 60, 61
 
   */
+
+  let minAge = 18;
+  let maxAge = 60;
+  let age = 60;
+  
+  //typeof(age) !== "number" && console.log("Incorrect data type");
+  if (isNaN(age)) {
+    console.log("Incorrect data type")
+  } else {
+    if (age < minAge) {
+      console.log ("You don't have access cause your age is " + String(age) + " It's less then ");
+    } else if (age >= minAge && age < maxAge) {
+      console.log("Welcome  !");
+    } else if (age > maxAge) {
+      console.log("Keep calm and look Culture channel");
+    } else {
+      console.log("Technical work");
+    }
+  }
+
+  
\ No newline at end of file
diff --git a/homework-solutions/js/hw-4/task-3.js b/homework-solutions/js/hw-4/task-3.js
index a3e2e89a..291eefa8 100644
--- a/homework-solutions/js/hw-4/task-3.js
+++ b/homework-solutions/js/hw-4/task-3.js
@@ -6,3 +6,19 @@
   преобразовываясь в number
 
 */
+
+  let minAge = 18;
+  let maxAge = 60;
+  let age = "4";
+  
+  typeof(age) !== "number" && console.log("Incorrect data type");
+
+  if (+age < minAge) {
+    console.log ("You don't have access cause your age is " + String(age) + " It's less then ");
+  } else if (+age >= minAge && +age < maxAge) {
+    console.log("Welcome  !");
+  } else if (+age > maxAge) {
+    console.log("Keep calm and look Culture channel");
+  } else {
+    console.log("Technical work");
+  }
\ No newline at end of file
diff --git a/homework-solutions/js/hw-5/task-1.js b/homework-solutions/js/hw-5/task-1.js
index ec48e3b7..49f05bce 100644
--- a/homework-solutions/js/hw-5/task-1.js
+++ b/homework-solutions/js/hw-5/task-1.js
@@ -6,6 +6,19 @@
 
 let evenNumbersResult = '';
 
+let i = 10
+
+while (i>=0) {
+    if (i>0) {
+        evenNumbersResult = (evenNumbersResult + i + '-')
+        i = i - 2
+    } else  {
+        evenNumbersResult = (evenNumbersResult + i)
+        i = i - 2
+    }
+}
+
+
 /**
  * Создать строку из 5 строк с увеличивающимся количеством смайликов ":)".
  * Переменная для результата `smilePatternResult` уже создана и содержит пустую строку.
@@ -19,6 +32,25 @@ let evenNumbersResult = '';
 
 let smilePatternResult = '';
 
+let smile = ":)"
+
+let n_strok = 1
+
+while(n_strok <= 5) {
+    if (n_strok <= 4 ) {
+        smilePatternResult  += smile.repeat(n_strok) + '\n'
+        n_strok++
+
+    } else {
+        smilePatternResult  += smile.repeat(n_strok)
+        n_strok++
+    }
+}
+
+
+
+
+
 /**
  * Заменить все пробелы в переменной text на "1".
  * Переменная для результата `replaceSpacesWithOneResult` уже создана и содержит пустую строку.
@@ -27,4 +59,10 @@ let smilePatternResult = '';
 const text = 'Hello! I am a JS student!';
 let replaceSpacesWithOneResult = '';
 
+replaceSpacesWithOneResult = text.replaceAll(" ", 1)
+console.log(replaceSpacesWithOneResult)
+ 
+
+
+
 export { evenNumbersResult, smilePatternResult, replaceSpacesWithOneResult };
diff --git a/homework-solutions/js/hw-5/task-2.js b/homework-solutions/js/hw-5/task-2.js
index f7e9acd3..6ac4bc37 100644
--- a/homework-solutions/js/hw-5/task-2.js
+++ b/homework-solutions/js/hw-5/task-2.js
@@ -18,4 +18,28 @@
  */
 let fizzBuzzResult = '';
 
+let i = 1
+
+while (i <= 100) {
+    if (i % 3 ==0 && i % 5 == 0) {
+        fizzBuzzResult = fizzBuzzResult + (+i + " - делится и на 3 и на 5" + '\n') 
+        i++} 
+    else if (i % 3 ==0) {
+        fizzBuzzResult = fizzBuzzResult + (+i + " - делится на 3" + '\n')
+        i++}
+    else if (i % 5 == 0) {
+        fizzBuzzResult = fizzBuzzResult + (+i + " - делится на 5")
+        if (i < 100){ 
+            fizzBuzzResult = fizzBuzzResult + '\n'
+        }
+        i++} 
+    else {
+        fizzBuzzResult = fizzBuzzResult + i + '\n'
+        i++
+    }
+}
+    
+
+//console.log(fizzBuzzResult)
+
 export { fizzBuzzResult };
diff --git a/homework-solutions/js/hw-6/task-1.mjs b/homework-solutions/js/hw-6/task-1.mjs
index 17e3ddd7..ed106e10 100644
--- a/homework-solutions/js/hw-6/task-1.mjs
+++ b/homework-solutions/js/hw-6/task-1.mjs
@@ -9,6 +9,19 @@
 */
 const forOf = [];
 
+const massiv_1 = [1,2,3,4,5,6,7,8,9,10]
+
+for (let i = 0; i < massiv_1.length; i++) {
+  if (massiv_1[i] % 2 == 0) {
+    forOf.push(Math.pow(massiv_1[i],2))
+  } else {
+    forOf.push(Math.pow(massiv_1[i],3))
+  }
+
+}
+  
+  
+
 /*
 2. Методы массивов
   - Создайте массив [1,2,3,4,5]
@@ -22,6 +35,15 @@ const forOf = [];
 
 let result;
 
+result = [1,2,3,4,5]
+
+result.push(6)
+result.unshift(0)
+result.splice(2,1)
+result.pop()
+
+
+
 /*
 3. Деструктуризация массивов
   - Создайте массив [3, 11, 32, 7, 20] 
@@ -30,6 +52,10 @@ let result;
   Пример: [1,2,3,4,5] => first === 1; second === 2, rest === [3,4,5]
 */
 
+const massiv_2 = [3, 11, 32, 7, 20]
+const[first, second, rest] = [3, 11, [32, 7, 20]]
+
+
 /*
 4. Конкатенация массивов
   - Создайте массив с числами [1,2,3,4,5]
@@ -39,4 +65,9 @@ let result;
   Создайте переменную mergedArray, который будет хранить значения из массивов 1 и 2
 */
 
+const massiv_3 = [1,2,3,4,5]
+const massiv_4 = [6, 7, 8, 9, 10]
+const mergedArray = [...massiv_3,...massiv_4]
+
+
 export { forOf, result, first, second, rest, mergedArray };
diff --git a/homework-solutions/js/hw-6/task-2.mjs b/homework-solutions/js/hw-6/task-2.mjs
index 5ed1fd27..c5727988 100644
--- a/homework-solutions/js/hw-6/task-2.mjs
+++ b/homework-solutions/js/hw-6/task-2.mjs
@@ -16,4 +16,32 @@
 let resultUnique;
 let resultNull;
 
+const competitorPizzas_1 = [];
+
+
+resultUnique = []
+
+const competitorPizzas = ['Peperoni', 'Caprichosa', 'Diablo', '4 cheeses', 'hawai']
+const myPizzasT1 = ['Peperoni', 'Margherita', 'Diablo', 'Vegetarian'];
+const myPizzasT2 = ['Peperoni', 'Caprichosa', 'Diablo', '4 cheeses', 'hawai']
+
+for (let i = 0; i < competitorPizzas.length; i++) {
+  competitorPizzas_1.push(competitorPizzas[i].toLowerCase());
+}
+
+for (let i = 0; i < myPizzasT1.length; i++) {
+  if (!competitorPizzas_1.includes(myPizzasT1[i].toLowerCase())) {
+    resultUnique.push(myPizzasT1[i]);
+  } else {
+    resultNull = null;
+  }
+}
+for (let i = 0; i < myPizzasT2.length; i++) {
+  if (!competitorPizzas_1.includes(myPizzasT2[i].toLowerCase())) {
+    resultUnique.push(myPizzasT2[i]);
+  } else {
+    resultNull = null;
+  }
+}
+
 export { resultNull, resultUnique };
diff --git a/homework-solutions/js/hw-7/task-1.mjs b/homework-solutions/js/hw-7/task-1.mjs
index 06157d70..0081ab2d 100644
--- a/homework-solutions/js/hw-7/task-1.mjs
+++ b/homework-solutions/js/hw-7/task-1.mjs
@@ -5,9 +5,15 @@
   - Например: mergeArrays([1,2], [3,4], [5,6]) // [1,2,3,4,5,6]
   - Решить с использованием Spread operator
 */
-function mergeArrays() {
-  // Ваш код
+function mergeArrays(...mergeArrow) {
+  let spisok = []
+    for (const i of mergeArrow) {
+      spisok.push(...i)
+    }
+    return spisok
 }
+mergeArrays([1,2], [3,4], [5,6])
+
 /*
   2. Devide by _
     - Написать функцию, которая преобразует любое предложение в вот_Такой_Вот_Вид и возвращает его. 
@@ -15,8 +21,31 @@ function mergeArrays() {
     - Пример: I am super engineer => i_Am_Super_Engineer
   */
 function devideBy(sentence) {
-  // Ваш код
+  let new_sentence = sentence.split(" ")
+  let new_sentence_2 = []
+
+  // удалим пробелы в массиве
+  for (const element of new_sentence) {
+    if  (element !== '') {
+      new_sentence_2.push(element);
+  }
+  }
+
+    let final_sentence = []
+    for (let i = 0; i < new_sentence_2.length; i++) {
+        if (i === 0){ // условие для первого элемента
+
+        final_sentence.push(new_sentence_2[i][0].toLowerCase() + new_sentence_2[i].toLowerCase().slice(1))
+
+        } else  {
+        final_sentence.push(new_sentence_2[i][0].toUpperCase() + new_sentence_2[i].toLowerCase().slice(1)); }
+    }
+             
+    return final_sentence.join().replaceAll(",","_")
 }
+
+devideBy("iM  am sUpeR DEVELOP")
+
 /*
   3. Фибаначчи
     - Напишите функцию fibonacci(n), возвращающую энное число Фибоначчи
@@ -24,8 +53,29 @@ function devideBy(sentence) {
     первые два числа которой являются 0 и 1, а каждое последующее за ними число является суммой двух предыдущих
     - Например fibonacci(8) //21
   */
-function fibonacci(n) {
-  // Ваш код
-}
+
+function fibonacci(n){
+    
+    let sum_result = [0 , 1]  
+  
+    for (let item = 0; item <= n; item++) {
+      if (item == 0 || item == 1) {
+        sum_result.push(item)
+      }else {
+          let sum_number = ((sum_result.at(-1)) + (sum_result.at(-2)))
+          sum_result.push(sum_number)}
+          
+    }
+  
+    return sum_result.at(-1)
+  }
+        
+  
+fibonacci(0)
+
+
 
 export { mergeArrays, fibonacci, devideBy };
+
+
+
diff --git a/homework-solutions/js/hw-7/task-2.mjs b/homework-solutions/js/hw-7/task-2.mjs
index 3fccd977..aa8012e2 100644
--- a/homework-solutions/js/hw-7/task-2.mjs
+++ b/homework-solutions/js/hw-7/task-2.mjs
@@ -4,9 +4,17 @@
 */
 
 function isPalindrom(word) {
-  // Ваш код
+
+  if (typeof word === "string"){
+    return word.toLowerCase() === word.split("").reverse().join("").toLowerCase()
+  } else if (typeof word !== "string"){
+    return false
+  }
+     
 }
 
+console.log(isPalindrom(123))
+
 /*
  2. findLongestWords()
  Написать функцию, которая принимает предложение (слова разделенные только пробелами) в качестве параметра 
@@ -15,7 +23,29 @@ function isPalindrom(word) {
 */
 
 function findLongestWords(sentence) {
-  // Ваш код
+  
+  if (typeof sentence !== 'string' || sentence === "") return []
+  const new_strings = sentence.split(" ") // Рабиваем строку на массив строк 
+  //console.log(new_strings)
+
+  let longest_word = ""
+  let list_word;
+    
+  for (const item of new_strings) {
+    if (item.length > longest_word.length) {
+      longest_word = item // присваиваем значение
+      list_word = [item]
+      //list_word.length = 0 // обнуляем массив, если нашли слово длиннее
+      //list_word.push(item) // добавляем в массив новое значение
+      
+      } else if (item.length == longest_word.length) {
+        list_word.push(item) }
+       }
+
+  return list_word 
 }
+  
+
+console.log(findLongestWords ("Пожар лес пожар"))
 
 export { isPalindrom, findLongestWords };
diff --git a/homework-solutions/js/hw-8/task-1.mjs b/homework-solutions/js/hw-8/task-1.mjs
index 77be2fb2..4e47a086 100644
--- a/homework-solutions/js/hw-8/task-1.mjs
+++ b/homework-solutions/js/hw-8/task-1.mjs
@@ -15,12 +15,51 @@
 const numbers = [7, 8, 2, 30, 85, 95, 77, 94, 37, 31];
 
 let forEach;
+forEach = []
+
+numbers.forEach ((element) => {
+   if (element % 3 == 0) {
+      forEach.push(element)
+   }
+})
+
+
 let map;
+const massiv_length = numbers.length
+map = numbers.map((el) => el - massiv_length)
+
+//console.log(map)
+
 let filter;
+
+filter = numbers.filter((el, index, number)=> el > number[index - 1])
+
+//console.log(filter)
+
 let find;
+
+find = numbers.find((item, index)=> item === index)
+//console.log(find)
+
 let sort;
+
+sort = numbers.sort((a, b) => a - b)
+//console.log(sort)
+
 let reduce;
+reduce = numbers.reduce((result, el) => {
+   result += el
+   return result
+}, 0 )
+
+//console.log(reduce)
+
 let some;
+some = numbers.some(el => el > 90)
+
 let every;
 
+every = numbers.every(el => el >=10 && el <=99)
+//console.log(every)
+
 export { forEach, map, filter, find, sort, reduce, some, every };
diff --git a/homework-solutions/js/hw-8/task-2.mjs b/homework-solutions/js/hw-8/task-2.mjs
index 0a7a53f0..caf6eb11 100644
--- a/homework-solutions/js/hw-8/task-2.mjs
+++ b/homework-solutions/js/hw-8/task-2.mjs
@@ -18,8 +18,20 @@ const words = [
   'queue',
 ];
 
-function sortedByVowels(wordsArr) {
-  // Ваш код
+
+function sortedByVowels(wordsArr = []) {
+  function countWords (words){
+    const spisok = 'aueoyi';
+     return [...words].filter((el) => spisok.includes(el)).length
+     
+  }
+  return wordsArr.sort((a, b) => countWords(a) - countWords(b))
 }
 
+
+
+
+
+
+
 export { sortedByVowels };
diff --git a/homework-solutions/js/hw-9/task-1.mjs b/homework-solutions/js/hw-9/task-1.mjs
index ae59bbb2..e5b405b1 100644
--- a/homework-solutions/js/hw-9/task-1.mjs
+++ b/homework-solutions/js/hw-9/task-1.mjs
@@ -13,9 +13,18 @@ const character = { name: 'Barney', age: 36, gender: 'male', isQa: true };
 // 1
 let keyWithFourChars;
 
+keyWithFourChars = Object.keys(character).filter(el=> el.length == 4);
+//console.log(keyWithFourChars)
+
+
+
 // 2
 let stringValues;
 
+stringValues = Object.values(character).filter(el=>typeof el === "string");
+
+//console.log(stringValues)
+
 // 3
 /* Do not touch this part */
 const logSpy = jest.spyOn(console, 'log');
@@ -24,8 +33,18 @@ const logSpy = jest.spyOn(console, 'log');
 // Ваш код
 let keyValuePairs;
 
+keyValuePairs = Object.entries(character);
+//console.log(keyValuePairs)
+
+for(const [key, value] of keyValuePairs){
+  console.log(`key = ${key}, value = ${value}`)
+}
+
 // 4
 let hasSalaryKey1stOption;
 let hasSalaryKey2ndOption;
 
+hasSalaryKey1stOption = "salary" in character;
+hasSalaryKey2ndOption = Object.hasOwn(character, "salary");
+
 export { keyWithFourChars, stringValues, hasSalaryKey1stOption, hasSalaryKey2ndOption, keyValuePairs, logSpy };
diff --git a/homework-solutions/js/hw-9/task-2.mjs b/homework-solutions/js/hw-9/task-2.mjs
index c1b901c5..58a158ea 100644
--- a/homework-solutions/js/hw-9/task-2.mjs
+++ b/homework-solutions/js/hw-9/task-2.mjs
@@ -14,23 +14,43 @@ const characters = [
 ];
 
 function addCharacter(character) {
-  // Ваш код
+  if (!["name", "age"].every(key=> key in character)) throw new Error ("invalid key");
+  return characters.push({name: character.name, age: character.age})
 }
 
+//addCharacter(characters)
+//console.log(characters)
+
 function getCharacter(name) {
-  // Ваш код
+return characters.find(el=> el.name === name)
 }
 
+//console.log(getCharacter('Fred'))
+
 function getCharactersByAge(minAge) {
-  // Ваш код
+  if(typeof minAge != 'number') throw new Error ("invalid type of minAge");
+  return characters.filter(el => el.age >= minAge)
 }
+//console.log(getCharactersByAge(40))
+
 
 function updateCharacter(name, newCharacter) {
-  // Ваш код
+const get_character = getCharacter(name)
+if (!get_character) throw new Error(`Name "${name}" not found`);
+Object.assign(get_character, newCharacter);
+return characters;
+
+
 }
 
+
 function removeCharacter(name) {
-  // Ваш код
+  const index = characters.findIndex((el)=> el.name === name);
+  if (index === -1) throw new Error(`Name "${name}" not found`);
+  characters.splice(index, 1);
+  return characters;
+  
+
 }
 
 export { characters, addCharacter, updateCharacter, getCharacter, getCharactersByAge, removeCharacter };
diff --git a/package-lock.json b/package-lock.json
index 2dee20f9..e49e3090 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9,7 +9,8 @@
       "version": "1.0.0",
       "license": "ISC",
       "dependencies": {
-        "jest": "^29.7.0"
+        "jest": "^29.7.0",
+        "ts-node": "^10.9.2"
       },
       "devDependencies": {
         "@babel/plugin-transform-modules-commonjs": "^7.25.9",
@@ -18,7 +19,7 @@
         "husky": "^9.1.6",
         "prettier": "3.3.3",
         "ts-jest": "^29.2.5",
-        "typescript": "^5.6.3"
+        "typescript": "^5.8.2"
       }
     },
     "node_modules/@ampproject/remapping": {
@@ -1727,6 +1728,28 @@
       "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==",
       "license": "MIT"
     },
+    "node_modules/@cspotcode/source-map-support": {
+      "version": "0.8.1",
+      "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
+      "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
+      "license": "MIT",
+      "dependencies": {
+        "@jridgewell/trace-mapping": "0.3.9"
+      },
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": {
+      "version": "0.3.9",
+      "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
+      "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
+      "license": "MIT",
+      "dependencies": {
+        "@jridgewell/resolve-uri": "^3.0.3",
+        "@jridgewell/sourcemap-codec": "^1.4.10"
+      }
+    },
     "node_modules/@istanbuljs/load-nyc-config": {
       "version": "1.1.0",
       "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz",
@@ -2102,6 +2125,30 @@
         "@sinonjs/commons": "^3.0.0"
       }
     },
+    "node_modules/@tsconfig/node10": {
+      "version": "1.0.11",
+      "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz",
+      "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==",
+      "license": "MIT"
+    },
+    "node_modules/@tsconfig/node12": {
+      "version": "1.0.11",
+      "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz",
+      "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==",
+      "license": "MIT"
+    },
+    "node_modules/@tsconfig/node14": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz",
+      "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==",
+      "license": "MIT"
+    },
+    "node_modules/@tsconfig/node16": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz",
+      "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==",
+      "license": "MIT"
+    },
     "node_modules/@types/babel__core": {
       "version": "7.20.5",
       "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz",
@@ -2217,6 +2264,30 @@
       "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==",
       "license": "MIT"
     },
+    "node_modules/acorn": {
+      "version": "8.14.0",
+      "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz",
+      "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==",
+      "license": "MIT",
+      "bin": {
+        "acorn": "bin/acorn"
+      },
+      "engines": {
+        "node": ">=0.4.0"
+      }
+    },
+    "node_modules/acorn-walk": {
+      "version": "8.3.4",
+      "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz",
+      "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==",
+      "license": "MIT",
+      "dependencies": {
+        "acorn": "^8.11.0"
+      },
+      "engines": {
+        "node": ">=0.4.0"
+      }
+    },
     "node_modules/ansi-escapes": {
       "version": "4.3.2",
       "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz",
@@ -2269,6 +2340,12 @@
         "node": ">= 8"
       }
     },
+    "node_modules/arg": {
+      "version": "4.1.3",
+      "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
+      "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
+      "license": "MIT"
+    },
     "node_modules/argparse": {
       "version": "1.0.10",
       "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
@@ -2704,6 +2781,12 @@
         "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       }
     },
+    "node_modules/create-require": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
+      "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
+      "license": "MIT"
+    },
     "node_modules/cross-spawn": {
       "version": "7.0.6",
       "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
@@ -2767,6 +2850,15 @@
         "node": ">=8"
       }
     },
+    "node_modules/diff": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
+      "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
+      "license": "BSD-3-Clause",
+      "engines": {
+        "node": ">=0.3.1"
+      }
+    },
     "node_modules/diff-sequences": {
       "version": "29.6.3",
       "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz",
@@ -4056,7 +4148,6 @@
       "version": "1.3.6",
       "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
       "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
-      "dev": true,
       "license": "ISC"
     },
     "node_modules/makeerror": {
@@ -4817,6 +4908,49 @@
         "node": ">=10"
       }
     },
+    "node_modules/ts-node": {
+      "version": "10.9.2",
+      "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz",
+      "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==",
+      "license": "MIT",
+      "dependencies": {
+        "@cspotcode/source-map-support": "^0.8.0",
+        "@tsconfig/node10": "^1.0.7",
+        "@tsconfig/node12": "^1.0.7",
+        "@tsconfig/node14": "^1.0.0",
+        "@tsconfig/node16": "^1.0.2",
+        "acorn": "^8.4.1",
+        "acorn-walk": "^8.1.1",
+        "arg": "^4.1.0",
+        "create-require": "^1.1.0",
+        "diff": "^4.0.1",
+        "make-error": "^1.1.1",
+        "v8-compile-cache-lib": "^3.0.1",
+        "yn": "3.1.1"
+      },
+      "bin": {
+        "ts-node": "dist/bin.js",
+        "ts-node-cwd": "dist/bin-cwd.js",
+        "ts-node-esm": "dist/bin-esm.js",
+        "ts-node-script": "dist/bin-script.js",
+        "ts-node-transpile-only": "dist/bin-transpile.js",
+        "ts-script": "dist/bin-script-deprecated.js"
+      },
+      "peerDependencies": {
+        "@swc/core": ">=1.2.50",
+        "@swc/wasm": ">=1.2.50",
+        "@types/node": "*",
+        "typescript": ">=2.7"
+      },
+      "peerDependenciesMeta": {
+        "@swc/core": {
+          "optional": true
+        },
+        "@swc/wasm": {
+          "optional": true
+        }
+      }
+    },
     "node_modules/type-detect": {
       "version": "4.0.8",
       "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
@@ -4839,10 +4973,9 @@
       }
     },
     "node_modules/typescript": {
-      "version": "5.7.3",
-      "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz",
-      "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==",
-      "dev": true,
+      "version": "5.8.2",
+      "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz",
+      "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==",
       "license": "Apache-2.0",
       "bin": {
         "tsc": "bin/tsc",
@@ -4932,6 +5065,12 @@
         "browserslist": ">= 4.21.0"
       }
     },
+    "node_modules/v8-compile-cache-lib": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
+      "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
+      "license": "MIT"
+    },
     "node_modules/v8-to-istanbul": {
       "version": "9.3.0",
       "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz",
@@ -5048,6 +5187,15 @@
         "node": ">=12"
       }
     },
+    "node_modules/yn": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
+      "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
+      "license": "MIT",
+      "engines": {
+        "node": ">=6"
+      }
+    },
     "node_modules/yocto-queue": {
       "version": "0.1.0",
       "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
diff --git a/package.json b/package.json
index 18dedf21..31564540 100644
--- a/package.json
+++ b/package.json
@@ -36,7 +36,8 @@
   "author": "",
   "license": "ISC",
   "dependencies": {
-    "jest": "^29.7.0"
+    "jest": "^29.7.0",
+    "ts-node": "^10.9.2"
   },
   "devDependencies": {
     "@babel/plugin-transform-modules-commonjs": "^7.25.9",
@@ -45,6 +46,6 @@
     "husky": "^9.1.6",
     "prettier": "3.3.3",
     "ts-jest": "^29.2.5",
-    "typescript": "^5.6.3"
+    "typescript": "^5.8.2"
   }
 }


Reviews:
user: login: VladimirLQA
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-12T21:12:49Z
user: login: VladimirLQA
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-12T21:13:50Z
user: login: VladimirLQA
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-12T21:17:20Z
user: login: VladimirLQA
state: APPROVED
author_association: COLLABORATOR
submitted_at: 2025-03-12T21:17:23Z
user: login: VladimirLQA
state: APPROVED
author_association: COLLABORATOR
submitted_at: 2025-03-18T21:57:40Z
user: login: anatoly-karpovich
state: APPROVED
author_association: COLLABORATOR
submitted_at: 2025-03-19T08:39:49Z

Review comments:
diff_hunk: @@ -15,7 +23,27 @@ function isPalindrom(word) {
 */
 
 function findLongestWords(sentence) {
-  // Ваш код
+  
+  if (typeof sentence !== 'string' || sentence === "") return []
+  const new_strings = sentence.split(" ") // Рабиваем строку на массив строк 
+  console.log(new_strings)
+
+  let longest_word = ""
+  const list_word = []
+    
+  for (const item of new_strings) {
+    if (item.length > longest_word.length) {
+      longest_word = item // присваиваем значение
+      list_word.length = 0 // обнуляем массив, если нашли слово длиннее
+      list_word.push(item) // добавляем в массив новое значение
path: homework-solutions/js/hw-7/task-2.mjs
user: login: VladimirLQA
body: И не забьіть поправить переменную `list_word`
```suggestion
      list_word = [item] // обнуляем и добавляем в массив, если нашли слово длиннее
```
created_at: 2025-03-12T21:12:49Z
author_association: COLLABORATOR
diff_hunk: @@ -4,9 +4,17 @@
 */
 
 function isPalindrom(word) {
-  // Ваш код
+
+  if (typeof word === "string"){
+    return word.toLowerCase() === word.split("").reverse().join("").toLowerCase()
+  } else if (typeof word !== "string"){
+    return false
+  }
path: homework-solutions/js/hw-7/task-2.mjs
user: login: VladimirLQA
body: ```suggestion
  if (typeof word !== "string") throw new Error(''); // return false;
    return word.toLowerCase() === word.split("").reverse().join("").toLowerCase();
```
created_at: 2025-03-12T21:13:49Z
author_association: COLLABORATOR
diff_hunk: @@ -6,3 +6,19 @@
   преобразовываясь в number
 
 */
+
+  let minAge = 18;
+  let maxAge = 60;
+  let age = "4";
+  
+  typeof(age) !== "number" && console.log("Incorrect data type");
path: homework-solutions/js/hw-4/task-3.js
user: login: VladimirLQA
body: Для даного задания нужно привести и проверить является ли значение числом, в чем же тогда отличие от 2-го задания, хммм
Как вариант использовать `isNaN`

created_at: 2025-03-12T21:17:20Z
author_association: COLLABORATOR

PR comments:
user: login: BorodinaEvg
created_at: 2025-03-17T21:07:00Z
body: Изменила task 4.3 и task 7.2
Добавила HW 9 task 1 и task 2
![HW 9 Task 1](https://github.com/user-attachments/assets/814b661e-3399-429c-812a-96b5026a0d94)
![HW9 Task 2](https://github.com/user-attachments/assets/ef4e27ab-1853-4373-8de0-15d76ba58250)

author_association: OWNER