SHARE
TWEET

Untitled

a guest Jan 18th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var numeros = [0, 1, 2, 3, 4, 5, 6];
  2. var total = numeros.reduce((acumulador, numero, indice, original) => {
  3. console.info(`${acumulador} total até o momento`);
  4. console.log(`${numero} valor atual`);
  5. console.log(`${indice} indice atual`);
  6. console.log(`${original} array original`);
  7. return acumulador += numero;
  8. }, 0)
  9. console.warn('acaboooou');
  10. console.log(total)
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