Guest User

Untitled

a guest
Apr 19th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. oldArr = [1,2,3,4]
  2.  
  3. let newArr = oldArr.map((val, index, arr) => {
  4. // return element to new Array
  5. })
  6.  
  7.  
  8.  
  9. newArr - new array returned by the map method
  10. oldArr - old array that map is run on
  11. val - current value being processed
  12. index - current index of value being processed
  13. arr - original array
Add Comment
Please, Sign In to add comment