Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js array map

let A = [9000, 8500, 5500, 6500];
let B = A.map(function (value, index, array) {
    return value*2; // forEach 沒有在 return 的,所以不會有作用
});
console.log(B); // undefined
Source by ithelp.ithome.com.tw #
 
PREVIOUS NEXT
Tagged: #js #array #map
ADD COMMENT
Topic
Name
6+4 =