• 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
jasonfry89 Avatar
Name:Jason Fry
Clan:AMS
Member Since:Oct 2013
Last Seen:Nov 2018
Profiles:
Following:12
Followers:12
Allies:12
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (33)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • Rainapster
    • commented on "Scramblies" javascript solution
    • 3 months ago

    great solution

  • Custom User Avatar
    • acchang
    • commented on "Scramblies" javascript solution
    • 3 years ago

    way too complicated for the top answer to this tricky kata! I'm pretty proud of mine.

  • Custom User Avatar
    • yoshiskipiez
    • commented on "Scoring Tests" kata
    • 3 years ago

    honestly i dont know

  • Custom User Avatar
    • Amiko1
    • commented on "Scramblies" javascript solution
    • 3 years ago

    it's good :)

  • Custom User Avatar
    • Lucasss
    • commented on "Scramblies" javascript solution
    • 4 years ago

    Good point, calling the object "arr" confused me.

  • Custom User Avatar
    • ind0ver
    • commented on "Scramblies" javascript solution
    • 4 years ago

    it's kinda slow, mine is faster

  • Custom User Avatar
    • nachobibian
    • commented on "Scramblies" javascript solution
    • 5 years ago

    A faster approach timed me out, so I guess you cannot get away with this anymore...

  • Custom User Avatar
    • ykIsCoding
    • commented on "Scramblies" javascript solution
    • 5 years ago

    can someone please explain?? I don't understand

  • Custom User Avatar
    • user4868499
    • commented on "Scramblies" javascript solution
    • 6 years ago

    Checking if there is a key for the character with each character is not good for performance at all. It would be better to hardcode an object with all the values equal to 0, saving an if-statement in each iteration.

  • Custom User Avatar
    • cyphen21
    • commented on "Scramblies" javascript solution
    • 6 years ago

    @Firefly2002 you definitely had the best, more performant and readable solution. I learned a lot from it. Thanks.

  • Custom User Avatar
    • cyphen21
    • commented on "Scramblies" javascript solution
    • 6 years ago

    Is it always the case that a for loop is more performant than a reduce that does the same thing?

  • Custom User Avatar
    • xehpuk
    • commented on "Scramblies" javascript solution
    • 7 years ago

    They don't have the same mistake. This is the solution of only one person. The others just copied it and submitted it as their own. It's "occurrences".

  • Custom User Avatar
    • Voile
    • commented on "Scramblies" javascript solution
    • 7 years ago

    Higher-level JS methods (reduce, every) just aren't as fast as for loops.

    Yes, but are you sure the 20% performance overhead is really that important except in a very handful cases? ;-)

  • Custom User Avatar
    • WADAMOMO
    • commented on "Scramblies" javascript solution
    • 7 years ago

    "you just have to do some maths to figure out what that value is."

    lol you are literally the most annoying person.

    obviously when i wrote this 7 months ago i was trying to figure out why you couldn't just move the decrement to after without changing the 0 to a 1. thanks for the pointer though bruh, real helpful,

  • Custom User Avatar
    • hksong
    • commented on "Scramblies" javascript solution
    • 7 years ago

    It certainly isn't "best practice". And like the others have pointed out, this is not a performant solution. Probably doesn't warrant a downvote though.

    What's more interesting is the fact that 4 separate people had the exact same mistake...

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

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...