We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 86e8a7c commit 285f6a2Copy full SHA for 285f6a2
1 file changed
Sprint-2/implement/tally.js
@@ -3,7 +3,7 @@ function tally(items) {
3
throw new Error("Input must be an array");
4
}
5
6
- const counts = {};
+ const counts = Object.create(null);
7
8
for (const item of items) {
9
counts[item] = (counts[item] || 0) + 1;
0 commit comments