Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialDenis Savenko
Courses Plus Student 6,994 PointsJavaScript Map is like Python dictionary?
I read about differents javascript object and map, but i came in JS from Python world. Is new javascript map it the same like python dictionary? Maybe they have any difference?
1 Answer
Steven Parker
231,110 PointsThey are similar in many ways. But then, ordinary JavaScript objects are also similar to Python dictionaries in many ways.
But one difference that comes to mind is that maps in JS are always iterated in insertion order. I believe one of the rules of Python dictionaries is they have no reliable order.
Denis Savenko
Courses Plus Student 6,994 PointsDenis Savenko
Courses Plus Student 6,994 PointsThank you for you answer. Yes in Python dictionaries haven't any order. Thank you for this note.