Ad
  • Custom User Avatar

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

  • Custom User Avatar

    We can.

    Correct syntax would be this.valueOf = () => value.

  • Custom User Avatar
  • Default User Avatar

    I'm a beginner too, starting out in Ruby as my first language. However, before starting on Codewars, I completed the entire 9-hour length tutorial on Codecademy, as well as had some experience in trying to write some simple methods.

    I feel like Codewars really is a place to test your skills and find out your limits while trying to push them and learn about better ways to code than the ways you are used to. It acts as a supplement for your own learning of the language(s) (full blown-out tutorial series, or books/manuals) rather than replacing it altogether. So, if you find that you are starting to have trouble with katas frequently, it means you have to start doing some homework I guess? (which is the state I'm approaching now)

    After all, you don't go to battle without first sharpening your weapons! (or firming up your moves)

  • Default User Avatar

    To be completey honest, I think it should be a different kata level too. The way kata ranking works, or at least how they worked when I created this, is by beta testers input. As it happens, I think people that already knew some node.js decided to beta test this, and to them, it was really easy thus the rank 7.

  • Custom User Avatar

    Both of these are solid suggestions. Hint's has been something in perspective for a while, just requires a decent amount of work, especially on the side of updating all the content with info. @Skrewtape, great points on kata creation guidelines, that's much more immediately actionable.

  • Custom User Avatar

    functions are objects, so we are defining the function Singleton and additin a propery 'a'. I've called it 'a' to make a point that its arbitrary, could be named anything. sometimes people name this property instance or instance which makes it look like there is some magic going on, when its not.

    So when the funciton is called the first time and 'a' is undefined/falsy we'll store the function in a. So we are storing a reference to the function in a field on the same function, sounds a bit weird but it allows us to consitently return the same (functon) object is all subsequent calls.

  • Custom User Avatar

    Having just dipped my toe into trying to learn Clojure using this site, I understand completely. I think a "hint" system is a great idea, but I think there are a few even simpler things that could be done to make the easier katas more approachable to people who are just learning the language. For example, it should be more clear which test is failing, and the kata author could include hints in the test error messages.

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar
  • Custom User Avatar

    I started counting and determined that there were too many for me to count. Countless!

    Unless you cheat with admin powers :P

  • Custom User Avatar

    Well to be fair, there are about ~1436 solutions - so its not exactly countless :wink:

  • Custom User Avatar

    Yes, this kata has been completed 1436 times. Countless solutions for it have been submitted.