programming masterpiece
Oct. 7th, 2013 08:41 am(from
code_wtf)
In JavaScript, calculate the sum of integers in a nested array.
In JavaScript, calculate the sum of integers in a nested array.
i.toSource().replace(/\[|\]/g, '').split(', ').forEach(function(a){if(a.match(/^\d$/)) s -= -a})