News for hackers. Stuff that matters.

zoka

Re:TypedJS: Sanity Check your JavaScript on Wednesday February 08, 2012 @04:04AM (#3565836)
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.