Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- array.map(param1[, param2]);
- // param1 - Function(value, index, array)
- // param2 - Object (to bind as this)
- // EXAMPLE
- [1, 2, 3, 4, 5].map((val, i, arr) => {
- if (arr[i] === val) // always true
- return val + i;
- }); // [1, 3, 5, 7, 9]
Add Comment
Please, Sign In to add comment