HNHacker News
TopNewBestAskShowJobs

zoka

63 karma · joined November 22, 2010

submissionscomments
zoka··on TypedJS: Sanity Check your JavaScript
The add_all() function as presented on their web page is wrong,instead of adding the array elements it just returns the last one.

Line 180 should be: count += num_arr[i];

Moreover naming accumulation variable for sum "count" is totally counter intuitive.