Retired

Unlimited Sum (retired)

1,604 of 4,586Lordnibbler

Description:

Write a function sum that accepts an unlimited number of integer arguments, and adds all of them together.

The function should reject any arguments that are not integers, and sum the remaining integers.

sum(1, 2, 3) # => 6
sum(1, '2', 3) # => 4
sum(1, 2, 3)    ==>  6
sum(1, "2", 3)  ==>  4
sum(1, 2, 3)   // -> 6
sum(1, "2", 3) // -> 4
Mathematics
Fundamentals

Stats:

CreatedMay 9, 2014
Warriors Trained6855
Total Skips517
Total Code Submissions24193
Total Times Completed4586
Ruby Completions1604
JavaScript Completions1553
Python Completions1597
Total Stars57
% of votes with a positive feedback rating89% of 527
Total "Very Satisfied" Votes440
Total "Somewhat Satisfied" Votes60
Total "Not Satisfied" Votes27
Ad
Contributors
  • Lordnibbler Avatar
  • jhoffner Avatar
  • ZozoFouchtra Avatar
  • czyzykowski Avatar
  • anter69 Avatar
  • kazk Avatar
Ad