+ 3

How useful are map and set objects?

I don't really see how they could be useful, maybe I'm missing something, what exactly are they supposed to help you with? So far, all I really need in projects I make are normal arrays and objects

21st Dec 2020, 10:46 PM
Karak10
Karak10 - avatar
3 odpowiedzi
+ 2
A map is like a dictionary or look up table.
22nd Dec 2020, 4:33 AM
Sonic
Sonic - avatar
+ 2
Map can be very useful at least by two reasons: 1 - the keys in a map can be of any type, not only strings, as in objects. 2- a map is an iterable.
22nd Dec 2020, 10:11 PM
Felipe Navarro Tárraga
Felipe Navarro Tárraga - avatar