This concept probably wouldn’t confuse me except that two things have the same name and seem to do completely different things. There is the array method aka Array.map() which is basically (I know this is an over simplification) a fancy iterator. I can easily do anything I would with map or filter with a for…loop, it would generally just take more lines of code.
Whereas a Map is similar to a Set. I think Map is more for objects, and it comes with its own crud operations. For that matter, I have no idea why you would choose a Map over a Set and vice versa.
I would love to hear your creative ways of keeping these concepts straight in your own mind. Especially if you created analogies to remember it for yourself, though technical explanations are welcome too!
Thank you!
PS:
I did start by reading MDN on Maps and Array.prototype.map(). I just need more creative ways of thinking about it for it to stick.
Have have been working in JavaScript for a few years and just started learning python… Is a JS Map more like a Python dictionary than an object? I was thinking a dictionary is an object as I have been learning but maybe it is really a Map. I wish JS had chosen different names.