DEV Community

Discussion on: JS Performance: Perhaps We Shouldn't Always Use Arrays

 
nimmo profile image
Nimmo • Edited

Ah my apologies, I should have asked my question better than "tell me more", but thank you for the detail!

What I really meant was "how would I use a Set to allow findMyCat('Dante') to work?" In the interests of understanding better is all - I agree that a Map (which I now exists thanks to the comments on this post :-D) would have been a better choice here.