Comment utiliser la méthode de la carte en javascript
const numbers = [1, 2, 3, 4, 5];
const bigNumbers = numbers.map(number => {
return number * 10;
});
TechWhizKid
const numbers = [1, 2, 3, 4, 5];
const bigNumbers = numbers.map(number => {
return number * 10;
});
// create a Map
const map1 = new Map(); // an empty map
console.log(map1); // Map {}
['elem', 'another', 'name'].map((value, index, originalArray) => {
console.log(.....)
});