Answers for "what is a map js"

7

how to use the map method in javascript

const numbers = [1, 2, 3, 4, 5]; 

const bigNumbers = numbers.map(number => {
  return number * 10;
});
Posted by: Guest on April-08-2020
-2

map javascript

miMapa.forEach(function(valor, clave) {
  console.log(clave + ' = ' + valor);
});
// Mostrará 2 logs; el primero con "0 = cero" y el segundo con "1 = uno"
Posted by: Guest on February-11-2021
-2

is maps used in js

console.log(typeof(userRoles)); // object
console.log(userRoles instanceof Map); // true
Posted by: Guest on December-18-2020

Browse Popular Code Answers by Language