• Sign Up
    Time to claim your honor
  • Training
  • Practice
    Complete challenging Kata to earn honor and ranks. Re-train to hone technique
  • Freestyle Sparring
    Take turns remixing and refactoring others code through Kumite
  • Community
  • Leaderboards
    Achieve honor and move up the global leaderboards
  • Chat
    Join our Discord server and chat with your fellow code warriors
  • Discussions
    View our Github Discussions board to discuss general Codewars topics
  • About
  • Docs
    Learn about all of the different aspects of Codewars
  • Blog
    Read the latest news from Codewars and the community
  • Log In
  • Sign Up
shjohnson Avatar
Name:Samuel Johnson
Clan:Funding Circle
Member Since:Aug 2014
Last Seen:Aug 2024
Profiles:
Following:17
Followers:18
Allies:17
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (7)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • codegeist
    • commented on "Sum Arrays" ruby solution
    • 12 months ago

    For anyone wondering, this is definitely and absolutely NOT best practice! Its not even a clever solution.

  • Custom User Avatar
    • Husoski
    • commented on "Sum Arrays" ruby solution
    • 3 years ago

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar
    • lisomn
    • commented on "Sum Arrays" ruby solution
    • 6 years ago

    oh nice code

  • Custom User Avatar
    • shjohnson
    • commented on "Title Case" kata
    • 6 years ago

    This is true and you have to add an tmpy string in the first test as argument, but gets worse as i got another error with the tests that you cant see...

  • Custom User Avatar
    • user1802811
    • commented on "Sum Arrays" ruby solution
    • 10 years ago

    I thought the 0 was for if the array was empty.

  • Custom User Avatar
    • adrianzieba
    • commented on "Sum Arrays" ruby solution
    • 11 years ago

    It is really nice solution :)
    You can omit first parameter, and write "inject(:+)"

  • Custom User Avatar
    • abdhass
    • commented on "Sum Arrays" ruby solution
    • 11 years ago

    whats the " :+ " do? in other words, what does the second paramter take??? never seen nothing like this inject

  • © 2025 Codewars
  • About
  • API
  • Blog
  • Privacy
  • Terms
  • Code of Conduct
  • Contact

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...