Skip to content

Instantly share code, notes, and snippets.

Avatar

Dean Keesey dkeesey

View GitHub Profile
@dkeesey
dkeesey / iterators.js
Created Sep 29, 2019 — forked from aegorenkov/iterators.js
HardParts Promises and Iterators
View iterators.js
// Type JavaScript here and click "Run Code" or press Ctrl + s
console.log('Hello, world!');
// CHALLENGE 1
function sumFunc(arr) {
// YOUR CODE HERE
let accumulator = 0;
for (let i = 0; i < arr.length; i++) {
accumulator += arr[i];