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

August 2025

S M T W T F S
      12
3456789
10 11 12 13141516
17181920212223
24252627282930
31      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 17th, 2025 09:50 pm
Powered by Dreamwidth Studios