• 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
sonamu Avatar
Name:Unknown
Clan:Unknown
Skills:javascript, nodejs
Member Since:Jun 2016
Last Seen:Oct 2023
Profiles:
Following:5
Followers:4
Allies:3
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (57)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • Dave737
    • commented on "Thinkful - Logic Drills: Traffic light" javascript solution
    • 9 months ago

    You can just return an object without parenthesis ()

  • Custom User Avatar
    • svolodarskiy
    • commented on "Sums of Parts" javascript solution
    • 2 years ago

    It works until there is NaN or Inf in ls or there is loss of precision.

  • Custom User Avatar
    • atultiwaree
    • commented on "Even or Odd" javascript solution
    • 2 years ago

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

  • Custom User Avatar
    • dkfl1995
    • commented on "Sums of Parts" javascript solution
    • 3 years ago

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

  • Custom User Avatar
    • sonamu
    • commented on "Count the Monkeys!" javascript solution
    • 3 years ago

    😄

  • Custom User Avatar
    • cillbq
    • commented on "Count the Monkeys!" javascript solution
    • 3 years ago

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

  • Custom User Avatar
    • daylightisburning
    • commented on "Sums of Parts" javascript solution
    • 5 years ago

    thanks a lot! It doesn't allow me switch the flag now :(

  • Custom User Avatar
    • Blind4Basics
    • commented on "Sums of Parts" javascript solution
    • 5 years ago

    That's dangerous. If you skip it and the array has a length of one, you'll try to add the first element with undefined. So it's better practices to add it anyway (only case where you can forget it is when you're absolutely sure there are at least 2 elements.

    What you cannot skip, tho: the spoiler flag. ;p

  • Custom User Avatar
    • daylightisburning
    • commented on "Sums of Parts" javascript solution
    • 5 years ago

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

  • Custom User Avatar
    • emgordon154
    • commented on "Sums of Parts" javascript solution
    • 5 years ago

    Using map for side effects is generally a yikes, but I think here it's kind of beautiful in a golfy way

  • Custom User Avatar
    • sjamr10
    • commented on "Sums of Parts" javascript solution
    • 6 years ago

    The only bad thing about this solution is that it modifies the input. Still very clever and elegant.

  • Custom User Avatar
    • JohanWiltink
    • commented on "Even or Odd" javascript solution
    • 6 years ago

    Honestly, if you can't read this, I couldn't explain.

    If you don't know where to look up &, try here.

  • Custom User Avatar
    • Eng Stu
    • commented on "Even or Odd" javascript solution
    • 6 years ago

    how does it work?

  • Custom User Avatar
    • cyphen21
    • commented on "Sums of Parts" javascript solution
    • 6 years ago

    Even though this solution traverses the entire array twice, I still think it is clever because it is so idiomatic. Nice job.

  • Custom User Avatar
    • phildinius
    • commented on "Spread number" javascript solution
    • 6 years ago

    Why not assign i = 1 and not add 1 to i each loop? Is there a reason?

  • Loading more items...
  • © 2025 Codewars
  • About
  • API
  • Blog
  • Privacy
  • Terms
  • Code of Conduct
  • Contact

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...