Skip to content

Commit a12cf39

Browse files
committed
now with proper formatting of implement/tally.js
1 parent 0c8870b commit a12cf39

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Sprint-2/implement/tally.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ function tally(arr) {
44
}
55
const result = {};
66
for (const item of arr) {
7-
if (Object.hasOwn(result, item)) {
8-
result[item]++;
9-
} else {
10-
result[item] = 1;
11-
}
7+
if (Object.hasOwn(result, item)) {
8+
result[item]++;
9+
} else {
10+
result[item] = 1;
1211
}
1312
}
14-
return result;
13+
}
14+
return result;
1515

1616
module.exports = tally;

0 commit comments

Comments
 (0)