Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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
});
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #map #js
ADD COMMENT
Topic
Name
7+2 =