Frequency Counter — JavaScript easy interview problem
Given an array of values `arr`, return an object (plain map) from each unique value to its occurrence count. Keys should be stringified as in a normal JS object (numbers become string keys). Example: `frequencyCounter([1,1,2,3,3,3])` → `{ "1": 2, "2": 1, "3": 3 }`.
Tags: hashmap, counting
Practice this HashMap & Set problem free in the JS Interview Playground with automated tests and unlockable solutions.