SHARE
TWEET

Untitled

a guest Jul 19th, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let arr = [1,2,3,4,5];
  2. let sum = arr.reduce((previous, current) => current += previous);
  3. let avg = sum / arr.length;
  4.  
  5. console.log(avg)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top