Skip to content

Commit

Permalink
Merge pull request #5 from Elias5757/master
Browse files Browse the repository at this point in the history
решена задача 2.1
  • Loading branch information
jsru-1 authored Sep 28, 2024
2 parents 3dca3f3 + 45e9628 commit 983f2b4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions 2-module/1-task/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
function sumSalary(salaries) {
// ваш код...
}
let sum = 0;
for (let key in salaries) {
if (typeof(salaries[key]) === 'number' && isFinite(salaries[key]) == true) {
sum = sum + salaries[key];
}
}
return sum;
}

0 comments on commit 983f2b4

Please sign in to comment.