Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- oldArr = [1,2,3,4]
- let newArr = oldArr.map((val, index, arr) => {
- // return element to new Array
- })
- newArr - new array returned by the map method
- oldArr - old array that map is run on
- val - current value being processed
- index - current index of value being processed
- arr - original array
Add Comment
Please, Sign In to add comment