• 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
Meow Avatar
Name:Mark
Clan:Unknown
Member Since:Apr 2015
Last Seen:Sep 2015
Profiles:
    Following:0
    Followers:2
    Allies:0
    View Profile Badges
    • Stats
    • Kata
    • Collections
    • Kumite
    • Social
    • Discourse
    • Conversations (99)
    • Replies
    • Authored
    • Needs Resolution
    • Custom User Avatar
      • Viktor.startsWith_Z
      • commented on "Directions Reduction" javascript solution
      • 13 months ago

      KANYE WEST!

    • Custom User Avatar
      • SuzukiStumpy
      • commented on "Directions Reduction" javascript solution
      • 16 months ago

      Love it. Way more succinct than mine.

    • Custom User Avatar
      • TarasYarovyi
      • commented on "Directions Reduction" javascript solution
      • 17 months ago

      That's a great solution

    • Custom User Avatar
      • Asiamies
      • commented on "Directions Reduction" javascript solution
      • 2 years ago

      took me 10 seconds to understand it

    • Custom User Avatar
      • Bharath-code
      • commented on "Directions Reduction" javascript solution
      • 2 years ago

      dirs is an accumulator which has been initialized as []

    • Custom User Avatar
      • electrounexpo
      • commented on "Directions Reduction" javascript solution
      • 2 years ago

      Sorry, first time commenting, already marked as spoiler. You could review my code, mine have never been reviewed. Thank you.

      Sorry for my bad English. Google translate

    • Custom User Avatar
      • Captain Quack
      • commented on "Directions Reduction" javascript solution
      • 2 years ago

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

    • Custom User Avatar
      • electrounexpo
      • commented on "Directions Reduction" javascript solution
      • 2 years ago

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

    • Custom User Avatar
      • jdx-code
      • commented on "Directions Reduction" javascript solution
      • 2 years ago

      WOW.. BIG FAN..!!

    • Custom User Avatar
      • benwick
      • commented on "Directions Reduction" javascript solution
      • 2 years ago

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

    • Custom User Avatar
      • adamb123
      • commented on "Directions Reduction" javascript solution
      • 3 years ago

      Can someone tell me what the values of "dirs" and "dir" is on the first iteration? I also don't know what the value of dirs[dirs.length - 1] is can someone tell me what that would be? I don't use the array methods that often, but I know that if the initial value is not given then it usually starts with the first two values in the array, like arr[0] and arr[1].

    • Custom User Avatar
      • SleepyAsura
      • commented on "Directions Reduction" javascript solution
      • 3 years ago

      Really not bad and usual code for understanding. I often forget the reduce can be used for array and etc not only for numbers

    • Custom User Avatar
      • newman-afk
      • commented on "Directions Reduction" javascript solution
      • 3 years ago

      that's taken me a little bit of time to finger out why coding like this, why stack. nice work!

    • Custom User Avatar
      • RachelBanana03
      • commented on "Directions Reduction" javascript solution
      • 3 years ago

      That's efficient and really clever. I didn't think of popping the array

    • Custom User Avatar
      • Arc-Data
      • commented on "Directions Reduction" javascript solution
      • 3 years ago

      Man im struggling to remember that reduce can also be used to initialize arrays. Nice one!

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

    Confirm

    • Cancel
    • Confirm

    Collect: undefined

    Loading collection data...