• 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
Randy808 Avatar
Name:Unknown
Clan:Unknown
Member Since:Nov 2014
Last Seen:Jul 2018
Profiles:
Following:1
Followers:1
Allies:1
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (18)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • alagunoff
    • commented on "Sum of a sequence" javascript solution
    • 2 years ago

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

  • Custom User Avatar
    • AndrewGunderin
    • commented on "Sum of a sequence" javascript solution
    • 3 years ago

    Empty your mind.

    Now recursion can flow or it can crash.

    Be recursion, my friend)))

  • Custom User Avatar
    • bryanjug
    • commented on "Sum of a sequence" javascript solution
    • 4 years ago

    how did 0 + 3 + 2 + 1 equal to 5?

  • Custom User Avatar
    • EdThePro
    • commented on "Sum of a sequence" javascript solution
    • 5 years ago

    Coming from Haskell, I find it hard to use loops (even though I've used JavaScript for two years before learning Haskell). When I started solving katas in JavaScript, I kept on trying to use recursion instead of loops because it was faster. But soon learnt that it's not.

  • Custom User Avatar
    • ringm
    • commented on "Sum of a sequence" javascript solution
    • 5 years ago

    how would you find n?

  • Custom User Avatar
    • Sergiu Pop
    • commented on "Sum of a sequence" javascript solution
    • 5 years ago

    I understand, Thank you!

  • Custom User Avatar
    • JH108
    • commented on "Sum of a sequence" javascript solution
    • 5 years ago

    Generally you'd want to avoid recursion in JS since it functions by adding additional calls to the callstack and that can cause a crash if the input is large enough. As far as writing production code goes I've only ever used recursion a couple of times to traverse tree like structures. Hope this helps!

  • Custom User Avatar
    • Sergiu Pop
    • commented on "Sum of a sequence" javascript solution
    • 5 years ago

    i'm a beginner and wondering,is it the best practice to use recursion in general where possible?
    It seems like a more complicated concept so if you have some begginers in a company it would be more confusing.

  • Custom User Avatar
    • timbuckley
    • commented on "Sum of a sequence" javascript solution
    • 8 years ago

    If your range is large enough, this recursion exceeds maximum call stack.

    > sequenceSum(1,100000,1)
    RangeError: Maximum call stack size exceeded
        at sequenceSum (repl:1:15)
        at sequenceSum (repl:5:18)
        at sequenceSum (repl:5:18)
        at sequenceSum (repl:5:18)
        at sequenceSum (repl:5:18)
        at sequenceSum (repl:5:18)
        at sequenceSum (repl:5:18)
        at sequenceSum (repl:5:18)
        at sequenceSum (repl:5:18)
        at sequenceSum (repl:5:18)
    
  • Custom User Avatar
    • lBeJIuk
    • commented on "Sum of a sequence" javascript solution
    • 8 years ago

    "Best Practices" - with recursion? mmm....

  • Custom User Avatar
    • alkie
    • commented on "Sum of a sequence" javascript solution
    • 8 years ago

    can you please explain sequenceSum 1,3,1 how it calculate?
    thanks

  • Custom User Avatar
    • ryanjmack
    • commented on "Sum of a sequence" javascript solution
    • 8 years ago

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

  • Custom User Avatar
    • Tandyman
    • commented on "Basic Encryption" kata
    • 9 years ago

    The chars created by the encryption are not allways drawable by all the systems, so it signed as '?'.
    but it compares it's values -> so probably one of the chars is not as expected.

  • Custom User Avatar
    • baxtex
    • commented on "Basic Encryption" kata
    • 9 years ago

    Same problem here: text = iidqubkywkvbpgnhphzuvyjiysffqqxrddjr rule = 297 expected:<[????????????????????????????????????]> but was:<[????????????????????????????????????]>

  • Custom User Avatar
    • Tandyman
    • commented on "Basic Encryption" kata
    • 9 years ago

    The chars created by the encryption are not allways drawable by all the systems, so it signed as '?'.
    but it doesnt mean that this is the correct sign.

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

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...