>
> map is used before it is defined here.
>
>
It's in a closure, and the map variable declaration is hoisted. But you're
right, this is bad coding style. Will change.