Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

map in an array

let numbers = [33, 22, 44, 55, 66, 77, 88, 99];
const getNumbers = numbers.map(number => number * 2);
console.log(getNumbers);
//Expected output:
/*[
    66,  44,  88, 110,
   132, 154, 176, 198
 ]
 */
Source by js.zonayed.me #
 
PREVIOUS NEXT
Tagged: #map #array
ADD COMMENT
Topic
Name
8+2 =