This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; |