Answers for "array map arrow function"

1

array map arrow function

materials.map((str) => {
  const {length} = str;
  return length;
});
Posted by: Guest on July-01-2020
3

arrow function map js

const exampleArray = ['aa','bbc','ccdd'];
console.log(exampleArray.map(a => a.length));
//Would print out [2,3,4]
Posted by: Guest on October-28-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language