Answers for "is maps used in js"

4

map in js

//map() methods returns a new array
const data = {name: "laptop", brands: ["dell", "acer", "asus"]}
let inside_data = data.brands.map((i) => {
	console.log(i); //dell acer asus
});
Posted by: Guest on July-09-2020
-2

is maps used in js

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

Code answers related to "Javascript"

Browse Popular Code Answers by Language