This post was originally published on attacomsian.com/blog.
Maps are a new data structure in JavaScript that allows you to create collections o...
For further actions, you may consider blocking this person and/or reporting abuse
This is a great overview! I was expecting it to be the other map as that seems to be what people focus on and use more. But I am pleasantly surprised that you are highlighting less used but very useful functionality.
Why people dont use these more is a mystery to me. I often see people using Objects or even JSON without ever stopping to think about
Map
May be because Maps are relatively new (introduced in ES6) whereas Objects are around since JavaScript version 1 and supported by all browsers.
Same though!
You wrote
I believe you may have meant
set()
Yeah, it should be
set()
method for maps :) I updated the post.Wow, I didn't know that, thanks !
I don't see use cases for now but it seems pretty cool .
Thank you so much for this post. I've been stucked on map for awhile now and i have been using references online but this is the only one i've found useful so far.
Thank you! I'm glad it helped ✌️
Hi Atta,
Thank you so much for this post.
I have a question. How to post typescript map object to .net core webapi?
Actually Map.prototype.forEach does not behave like his array cousin. It returns a iterator.