Guest User

Untitled

a guest
Mar 8th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  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]
Add Comment
Please, Sign In to add comment