daily pastebin goal
85%
SHARE
TWEET

Untitled

a guest Mar 8th, 2018 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. array.map(param1[, param2]);
  2. // param1 - Function(value, index, array)
  3. // param2 - Object (to bind as this)
  4.  
  5. // EXAMPLE
  6. [1, 2, 3, 4, 5].map((val, i, arr) => {
  7.   if (arr[i] === val) // always true
  8.     return val + i;
  9. }); // [1, 3, 5, 7, 9]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top