Ad
  • Custom User Avatar

    This solution is pure genius!

  • Custom User Avatar
  • Custom User Avatar

    Because it's good practice to name constants like this. It gives them "meaning" and makes them easier to find.

    Generally, the more things you give an explicit name, the easier your code is to comprehend.

  • Custom User Avatar

    You're binding in render, violating the immutability of the props.

  • Custom User Avatar

    You're binding in render, violating the immutability of the props.

  • Custom User Avatar

    ??????

  • Custom User Avatar

    I suggest you change this one with the dictionary, and create a 7 kyu kata that makes you mix different sentences, like :

    • You've reached 10 hoops.
    • Using only one hand.
    • Sweating less than one liter of water.
    • = "Wow! You're doing good with that hand, and easily!".
  • Custom User Avatar

    Exactly. Thank you.

    Of course beginners have to learn how to use ternary operators, but that makes the kata a little bit too simplistic.

  • Custom User Avatar

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

  • Custom User Avatar

    A bit too simple IMHO. Having more degrees would force to code a nice dictionary.

  • Custom User Avatar

    Let me turn it more issue like.

    It MUST return a boolean. That's the best practice. This is no C and one of the target of this website should be to give people good habits.

  • Custom User Avatar

    Returning a boolean would make much more sense. This is no C.

    Other than that, I love it.

  • Custom User Avatar

    I'm sorry but it is an issue. I don't like being proposed one thousand katas that all look the same and barely help learning something. I understand there needs to be super simple katas for beginners, but I think those simple katas should at least ask for three different things to be interesting. Using sort() with it's function parameter override is one thing. Returning the array in reverse order could be another.

    Also, letting people some time to answer your questions before closing issues would be sweet. Just sayin'. ;-)

  • Custom User Avatar

    Not much interest...

    The kata is too simple and as little interest for learning or langage discovering. It should be expanded with more variety and difficulties, like expanding the Array prototype, or having it work with a parameterized property, and not just the "age" property.

  • Custom User Avatar

    I agree. It's horrible to have a method that can return either a string or an array depending on circumstances.

    Returning an unmodified array or throwing would be better.

  • Loading more items...