Skip to content

Commit 2db6f2c

Browse files
committed
fix: map to forEach
1 parent 70c59be commit 2db6f2c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

top-k-frequent-elements/higeuni.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
var topKFrequent = function(nums, k) {
1010
const countObject = {}
11-
nums.map((num) => {
11+
nums.forEach((num) => {
1212
if(countObject[num]) {
1313
countObject[num] += 1
1414
}else {

0 commit comments

Comments
 (0)