You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 1-js/05-data-types/09-keys-values-entries/01-sum-salaries/task.md
+7-12Lines changed: 7 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,23 +2,18 @@ importance: 5
2
2
3
3
---
4
4
5
-
# Sum the properties
5
+
# مجموع الخاصيات
6
6
7
-
There is a `salaries` object with arbitrary number of salaries.
7
+
أمامك كائن salaries وفيه بعض الرواتب. اكتب دالة sumSalaries(salaries) تُعيد مجموع كلّ الرواتب، باستعمال Object.values وحلقة for..of. لو كان الكائن فارغًا فيجب أن يكون الناتج صفرًا 0.
8
8
9
-
Write the function `sumSalaries(salaries)` that returns the sum of all salaries using `Object.values` and the `for..of` loop.
10
-
11
-
If `salaries` is empty, then the result must be `0`.
0 commit comments