DEV Community

Discussion on: Why is map called map?

Collapse
 
cappe987 profile image
Casper

Interesting question. I was aware of the connection to mathematics, but I've never heard of the analogy of a geographical map.

The data structure Map is essentially also related to the same origin. It maps a key to a value and the same input will always give the same output. While the data structure and the function are two separate things in programming they still follow the same concept.