Skip to content

Instantly share code, notes, and snippets.

@dmoney
dmoney / gist:6836237
Last active December 24, 2015 17:29 — forked from anonymous/gist:6836227
// my solution to exercise 5 of "you can't javascript under pressure"
// http://toys.usvsth3m.com/javascript-under-pressure/
function arraySum(i) {
// i will be an array, containing integers, strings and/or arrays like itself.
// Sum all the integers you find, anywhere in the nest of arrays.
var sum = 0;
var counter = 0;
var stack = [];
var call=false;