Oct. 7th, 2013

juan_gandhi: (VP)
(from [livejournal.com profile] code_wtf)

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})
juan_gandhi: (VP)


Медаль "За Присутствующих Здесь Дам!"
линк
juan_gandhi: (VP)
"Оказалось, что у нас с Челябинском не только на 3 часа отличается время, но еще отличается дата! Значит расстояние более 40.000 км, я так прикинул..." (из жж)

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

June 2025

S M T W T F S
1 2345 6 7
8 9 10 11 121314
15161718 192021
22232425262728
2930     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 19th, 2025 12:42 pm
Powered by Dreamwidth Studios