var o = {a:1, b:34, c:352} //итд. function s(obj) { var rez = 0; for(key in obj) { rez += obj[key]; } return rez; } alert(s(o));