Skip to content

Commit

Permalink
написал функцию для фильтрации массива чисел по заданному диапазону
Browse files Browse the repository at this point in the history
  • Loading branch information
Данейкин Илья Вячеславович authored and Данейкин Илья Вячеславович committed Oct 1, 2024
1 parent 3cad274 commit 6545faf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion 3-module/2-task/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
function filterRange(arr, a, b) {
// ваш код...
let result = arr.filter(function(item) {
return item >= a && item <= b;
})
return result;
}

0 comments on commit 6545faf

Please sign in to comment.