Articles → JAVASCRIPT → Array Map Function In Javascript
Array Map Function In Javascript
Purpose
Example
<html><head></head><body><script>
var arr = [12, 15, 21, 23];
console.log(arr.map(arr => arr));
// Multiply each value of an array by 2
console.log(arr.map(arr => arr* 2));
</script></body></html>
Output