Differences between the Immutable.js Map() and List()

J.S. Leonard
InstructorJ.S. Leonard

Share this video with your friends

Send Tweet

The Immutable.js Map() is analogous to a Javascript Object or Hash since it is comprised of key-value pairs. The Immutable.js List() is analogous to a Javascript Array and contains many of the same native methods. Let's compare the two and dive into the basics of List().

Sean Inglis
Sean Inglis
~ 6 years ago

Note that if you're using _.each to iterate over an array, there's no need to manually manage the index with a count; it's supplied as a second parameter to your iterated function (and the full array itself is provided as a 3rd).

J.S. Leonard
J.S. Leonardinstructor
~ 6 years ago

Hey Sean and Lee! You are both right! I use those conventions in other videos. Not sure why I used the closure var count there... must have been a brain flub. :P Thanks for the feedback!