About 50 results
Open links in new tab
  1. javascript - What is the concept of Array.map? - Stack Overflow

    Jun 28, 2013 · Summary Array.map is a function which is located on Array.prototype.map. The function does the following: Creates a new array with the same amount of entries/elements. Executes a …

  2. Javascript map method on array of string elements

    20 I am trying to understand how to implement the map method (rather than using a for loop) to check a string for palindromes and return boolean values for whether the mapped array elements reversed …

  3. javascript - Index inside map () function - Stack Overflow

    Jul 14, 2016 · 79 Array.prototype.map() index: One can access the index Array.prototype.map() via the second argument of the callback function. Here is an example:

  4. javascript - Map an array of arrays - Stack Overflow

    41 Is there a method in lodash to map over an array of arrays I would like to do something like this so that it keeps the structure of the array.

  5. How to get distinct values from an array of objects in JavaScript?

    Feb 28, 2013 · If it means that instead of "array" being an array of objects, but a "map" of objects with some unique key (i.e. "1,2,3") that would be okay too. I'm just looking for the most performance …

  6. How to skip over an element in .map ()? - Stack Overflow

    The map's inner mapping function can just return () (ie. no return val) rather than the invalid continue () , which will insert an undefined value as that element. That's consistent with the map () function's …

  7. javascript - Why does the `map` method apparently not work on arrays ...

    The .map() function therefore won't do anything (won't call the callback) when called on an array newly constructed with the Array constructor and a numeric argument.

  8. transform an array of objects with map ( ) - Stack Overflow

    Aug 30, 2021 · 0 Array.map() takes in a function as a parameter, passes each item of the array into the function, and returns an array of the result. For example, if I wanted to multiply each of the items in …

  9. Using array map to filter results with if conditional

    I am trying to use an array map to filter a object a bit further to prepare it to send to the server to for saving. I can filter to 1 key value, which is great, but I want to take it 1 step further...

  10. Mapping through an array to produce an object - Stack Overflow

    May 20, 2022 · Iterating throw your array and using a string parsed version of the value in the current iteration (parsing just in case, if you already know the array is made of strings, this is kinda …