Guest User

Untitled

a guest
Jun 22nd, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.14 KB | None | 0 0
  1. let arr = [1,2,3,4,5];
  2.  
  3. let result = arr.reduce((accumulator,currentValue)=>{
  4. return accumulator + currentValue;
  5. });
  6. console.log(result); /// 15
Add Comment
Please, Sign In to add comment