Ad
  • Default User Avatar

    as the kata specifically says it accepts only booleans as inputs, then yes thats what they want.

  • Default User Avatar

    boolToWord("Poppet") returns "Yes" is this what you wanted?

  • Default User Avatar

    This adds unnecessary complexity. When would this be the preferred way? I'm still learning. So, please take it easy on me.

  • Default 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

    lol, ya i've noticed there are a handful of really difficult kata 7's it would be nice if there were some easier ones to help us along and develop skills

  • 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.

  • Default User Avatar

    this seems pretty advanced for a 7 kata would be nice if there were more hints for those new to node and how to go about solving this kata.

  • Default User Avatar

    thanks but why if (!Singleton.a) , why not just define the property without the if statement.

  • 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.

  • Default User Avatar

    I feel like coding and solving problems with code in general has a very steep learning curve. Many times I have a vague idea of how to solve a problem but have no idea what methods to use or how to start. I think it would be very helpful for beginers, to have a "hint" or "help" feature so that we can still solve it ourselves and think through the problem but just have maybe a hint with a link or the name of a method or 2 that could be used to solve a problem. It gets very difficult to find kata to solve for the beginner/ novice and it would be really cool to have a way to allow them to solve with just a couple hints to make things a little easier until our novice minds develop a knowledge base of methods and techniques.

  • Loading more items...