function arrgu() { var sum = 0; for (var i in arguments) { sum = sum + arguments[i]; } document.write(sum); } arrgu(10, 20, 30, 40); arrgu(20, 40, 60); >100 >120