Cleaned up the js code a little bit from Brad's: some DOM variables were stored inside functions so I took them out and placed them at the top of the doc instead for better readability. Fixed the UI: ...
Maps were added as a data structure to JavaScript in the ES2015 update. In JavaScript, a map is a collection of key-value pairs. Maps are also known as dictionaries, hashmaps, and associative arrays ...