About 50 results
Open links in new tab
  1. Using destructuring in .map - The freeCodeCamp Forum

    May 23, 2021 · Map is a method for making a new array from an old one by ‘mapping’ old array elements to new values. Map takes a function is its argument. This function receives an array …

  2. React - Use Array.map () to Dynamically Render Elements - .map is ...

    Jan 25, 2023 · Yes, even in this case the map method technically maps an array to another array, as it would ordinarily. However, my understanding is that, when you map array items into JSX elements, …

  3. If statement in array map - The freeCodeCamp Forum

    Jun 12, 2020 · Here’s the same thing in one line using ternary operator (one-line if-else). arr.map(char => pairs.hasOwnProperty(char) ? pairs[char] : char) Also, char = char assigns char to itself, I’m not …

  4. Use Array.map () to Dynamically Render Elements

    Jun 10, 2018 · Use Array.map () to Dynamically Render Elements JavaScript cjbechtl June 10, 2018, 11:10pm 1

  5. Using .Map() on nested arrays - The freeCodeCamp Forum

    May 30, 2022 · Hello! Thanks for taking the time to read this. I’m looking to better understand how to use map on nested arrays. The following code accesses a nested array and adds one to every single …

  6. Using IF condition in Javascript's map method - JavaScript - The ...

    Jul 24, 2022 · Array.prototype.find () - JavaScript | MDN The find () method of Array instances returns the first element in the provided array that satisfies the provided testing function. If no values satisfy …

  7. .map is suddenly not a function? - The freeCodeCamp Forum

    Jul 5, 2017 · Because .map() is an array method, you’ll need to turn the data you want to work with into an array. Using the example above, since items is a comma separated string, the .split() method is …

  8. React-Typescript-useState issue - The freeCodeCamp Forum

    Apr 10, 2024 · Hello, firstly you don’t need the myToDos variable; you can manage it with an empty array in useState. const [toDos, setToDos] = useState<string[]>([]); Also you don’t need to button …

  9. .map() return undefined - JavaScript - The freeCodeCamp Forum

    Mar 2, 2022 · If it doesn’t match, you return nothing, which is the same as returning undefined. Is map what you want here? That returns a new array of the same size, each element transformed. But you …

  10. Why onClick run TWICE/ Why Array.map () vs Array.filter () returned ...

    Mar 3, 2023 · Hi, I have some questions while doing the Shopping Cart project. github link Can someone please explain why onClick function run twice but the value of Qty was updated only 1 time? the …