Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript map mdn

myRange = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
//understanding map power is similar to forEach, but concise
//creating objects
const newRange = myRange.map((d) =>({num : d * 5, tuo : d * 50}));

//creating updated ranges
const newRange = myRange.map((d) =>d * 5);
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #javascript #map #mdn
ADD COMMENT
Topic
Name
4+7 =