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

November 2025

S M T W T F S
       1
23456 7 8
9 1011 12 1314 15
16171819 202122
23242526272829
30      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Nov. 20th, 2025 04:25 pm
Powered by Dreamwidth Studios