About 301,000 results
Open links in new tab
  1. javascript - map function for objects (instead of arrays ... - Stack ...

    Feb 11, 2013 · // Takes the object to map and a function from (key, value) to mapped value. const mapObject = (obj, fn) => { const newObj = {}; Object.keys(obj).forEach(k => { newObj[k] = fn(k, …

  2. Map - JavaScript | MDN - MDN Web Docs

    Apr 2, 2025 · Map objects are collections of key-value pairs. A key in the Map may only occur once; it is unique in the Map 's collection. A Map object is iterated by key-value pairs — a …

  3. JavaScript Maps - W3Schools

    Complete JavaScript Map Reference. The reference contains descriptions and examples of all Map Properties and Methods. Map is an ES6 feature (JavaScript 2015). ES6 is fully supported …

  4. JavaScript Map Object

    In this tutorial, you have learned how to work with the JavaScript Map object and its useful methods to manipulate entries in the map.

  5. How to Use the JavaScript Map and Set Objects – Explained with …

    Feb 21, 2024 · Map and Set are two JavaScript data structures you can use to store a collection of values, similar to Objects and Arrays. They are specialized data structures that can help you …

  6. Map in JS - GeeksforGeeks

    Feb 11, 2025 · Map () constructor allows two ways to create a Map in JavaScript. Passing an Array to new Map(). Create a Map and use Map.set(). ['name', 'GFG'], ['age', 30], ['city', …

  7. Map to objects - The Modern JavaScript Tutorial

    So, actually you need to map one array of objects to another. Try using => here. There’s a small catch.

  8. JavaScript Map Object: Working with Maps - CodeLucky

    Feb 6, 2025 · Unlike traditional JavaScript objects, where keys are limited to strings or symbols, Map objects offer greater flexibility and control. This guide provides a comprehensive overview …

  9. JavaScript | Map | Codecademy

    Nov 5, 2021 · A Map is an object in JavaScript that stores entries of key-value pairs in their original insertion order. Values mapped to existing keys can be overwritten later. Keys/values …

  10. Javascript Map Object - Javascript Cheatsheet

    A Map is a built in object that holds key-value pairs. It can hold a key of any data type unlike in plain objects. It maintains the insertion order and provides helpers to manage key-value pairs.

Refresh