Relative Content

Tag Archive for javascriptdictionarysetarray.prototype.map

In JavaScript, what is the difference between a map, a Map and a Set?

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.