Earn extra honor and gain new allies!
Honor is earned for each new codewarrior who joins.
Learn more
  • A little too late, but because join returns a string, it doesn't transform the array to a string.

  • For each language:

    • C# - This has 100 random tests, so that one is alright already.
    • JavaScript - This only had five random tests, so I've increased it to 100.
    • Ruby - This has no random tests, but an issue has been raised for that.
  • This comment is hidden because it contains spoiler information about the solution

  • Nice kata, thx!

  • The Ruby version of this Kata has no random testing whatsoever and as such can be passed by returning a constant string. No other language versions suffer from this issue.

  • I'm sorry, I should have been more clear.

    First, let me say that I am commenting on the Ruby translation. The JS translation does not seem to have this issue, as the description specifies the numbers you receive will vary ("1 through 10 or less").

    The issue is not that the input does not change; the issue is that, for all stated possible input values, the return value of the function will be the same.

    In languages other than JS, you will receive the same 10 numbers in an array every time. Sorting these different inputs will always result in the same array. This means that the solution will ALWAYS be to simply return the following string:
    "10 9 8 7 6 5 4 3 2 1 liftoff!"

    Thus, a valid solution can safely ignore the input parameter. Having the parameter be there at all seems intentionally misleading.

    If the other translations worked the same as a JS solution, where the given numbers were not always 1 through 10, this would not be an issue.

  • use console.log(input) to see the inputs and you will notice they are randomly generated :)

  • How does it vary based on input? What input could you give to the function that would return a different string?

  • resolved

  • That should be suggestion not issue.

  • resolved

  • That should be a question, not an issue.

  • That should be a question , not an issue.

  • ??

  • output varies depending on the input :)

  • Loading more items...