up
This commit is contained in:
parent
83b93e5992
commit
9ad9063d00
742 changed files with 884 additions and 779 deletions
16
1-js/04-object-basics/01-object/5-sum-object/solution.md
Normal file
16
1-js/04-object-basics/01-object/5-sum-object/solution.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
|
||||
```js run
|
||||
let salaries = {
|
||||
John: 100,
|
||||
Ann: 160,
|
||||
Pete: 130
|
||||
}
|
||||
|
||||
let sum = 0;
|
||||
for(let key in salaries) {
|
||||
sum += salaries[key];
|
||||
}
|
||||
|
||||
alert(sum); // 390
|
||||
```
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue