how to initialize a javascript map with empty arrays as values code example
Example: javascript map over new array
// With ES6, you can do this:
[...Array(10)].map((a, b) => a)
// With ES6, you can do this:
[...Array(10)].map((a, b) => a)