Ad
  • Custom User Avatar

    this kata is underspecified and current solutions only work when the input function is simple enough. good luck extracting the parameter names from a pathological case like the following, that would be a blue / purple kata by itself:

    function   myFunc   (
        /* why is there a comment with commas in there ??? ,,, */
        param1,
        param2 = ",,,why is there a string with commas in there ??? ,,,", 
        [ destructuring, parameters, are, also, allowed ],
        [ andTheyCan = "have default values with commas too ,,, " ],
        ...whatAboutRestParameters
    ) {
    }
    
  • 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
    • No random tests

    • Node 12 should be enabled

  • Custom User Avatar

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

  • Custom User Avatar

    Tests are using Test.expect.

  • Custom User Avatar

    Not an issue

  • Custom User Avatar

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

  • Custom User Avatar

    Broken analogy. Dojos do not intentionally teach bad habits.

    Why not change it to an actual useful task like mapping an array of values to an array of keys or something?

    Sure, it's a lot easier of a problem, but at least it makes sense and trains you how to do something that is useful.

    And there's still "insight" to gain...

  • Custom User Avatar

    You cannot, that's true. But this is a dojo here... and the kata should give you an insight.
    btw: In Karate you won't defend yourself running a kata (e.g. Empi or Unsu) when you gonna beaten up by some rude guys.

  • Custom User Avatar

    Fool's kata. Waste of time. You cannot depend on parameter names in JavaScript. Give up now.

  • Custom User Avatar

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

  • Custom User Avatar

    If you are looking for fastest solution, for loop should always be faster than any Array prototype methods.

    A faster Array prototype method for this problem should be a single reduceRight since there is no concat required after as opposed to a filter solution.

  • Custom User Avatar

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

  • Custom User Avatar

    Nice one, but I believe the description could use some improvements - specifically, I think it should be more specific about the argument names.

    There's no information indicating whether the argument names should be extracted from the value (as the usage example might imply) or fixed arg names should be used (as the test cases seem to indicate).

    I'm guessing the latter was the original intent, but seeing how most solutions focus on parsing the values, the description definitely is not clear enough in this regard.

  • Loading more items...