Skip to content

Instantly share code, notes, and snippets.

View laniehei's full-sized avatar
🐢
teaching turtles to tango

Lanie Hei laniehei

🐢
teaching turtles to tango
View GitHub Profile
@laniehei
laniehei / iterators.js
Created September 15, 2018 18:21 — forked from aegorenkov/iterators.js
HardParts Promises and Iterators
// 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];