1. Home
  2. Javascript
  3. Map function
#javascript#es6

Performs an operation on each mapped value.

let values = [4, 54, 56, 23, 8, 54];
values.map(number => number * 2);
// This returns [8, 108, 112, 46, 16, 108]
copy
Full Javascript cheatsheet
Sitemap Git repository