1. Home
  2. Javascript
  3. Map function

Performs an operation on each mapped value.

#javascript#es6
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