• 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
mh_codewars Avatar
Name:Mohamed Hossam Eldine
Clan:Unknown
Member Since:Mar 2021
Last Seen:Aug 2022
Profiles:
Following:0
Followers:0
Allies:0
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (9)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • JohanWiltink
    • commented on "Find the majority" javascript solution
    • 4 years ago

    It's not intended to be understood. Readable code would be

    function(acc,val) {
      if ( val in acc )
        acc[val] += 1;
      else
        acc[val] = 1;
      return acc;
    }
    

    And there you see why it was written unreadably - it's shorter. Note that acc[val] may be undefined.

  • Custom User Avatar
    • mh_codewars
    • commented on "Previous multiple of three" javascript solution
    • 4 years ago

    Neat and clever

  • Custom User Avatar
    • mh_codewars
    • commented on "Difference between years. (Level 1)" javascript solution
    • 4 years ago

    What is the use of having plus sign in the year function?

  • Custom User Avatar
    • mh_codewars
    • commented on "Flatten and sort an array" javascript solution
    • 4 years ago

    This is the first time for me to recognize that concat() method can take more than one array as it's parameters!

  • Custom User Avatar
    • mh_codewars
    • commented on "Color Ghost" kata
    • 4 years ago

    It's hard to have test cases because it depends on random values.
    just skip the test code step and try the attempt option directly

  • Custom User Avatar
    • mh_codewars
    • commented on "Mobile Display Keystrokes" javascript solution
    • 4 years ago

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

  • Custom User Avatar
    • Stark1ll
    • commented on "Find the majority" javascript solution
    • 4 years ago

    Yeah same question,I would like to hear explanation

  • Custom User Avatar
    • mh_codewars
    • commented on "Find the majority" javascript solution
    • 4 years ago

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

  • Custom User Avatar
    • mh_codewars
    • commented on "Fake Binary" javascript solution
    • 4 years ago

    Good job!

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

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...