Ad
  • Custom User Avatar

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

  • Default User Avatar

    Thenkas for the translation. I just updated the description to make it clearer that the second argument of the getSerie function is optional and should default to 0.

  • Default User Avatar

    The fact that the argument is optional was only mentioned in the docbloc of the getSerie() function, now it is also in the description.

  • Default User Avatar

    You are right, it was only mentioned in the docbloc of the getSerie() function, now it is also in the description.

  • Default User Avatar

    I don't understand: the code you pasted here is a valid solution (at least now). What was the issue ?

  • Default User Avatar

    I agree it's a little verbose... I was playing with different node modules about code quality and tried to reach a nice score, so I copy / pasted that skeleton and the adapted my tests. :D

    Are you suggesting that I remove the test cases for the object and the functions or more than that ?
    If it's also about the numerical test cases being the ones in the description, it's because I hate typing test cases that are only in the description.

  • Default User Avatar

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

  • Default User Avatar

    It seems that Number.parseInt() gives the error on the CodeWars website. If you simply use parseInt, it will work.

  • Default User Avatar

    Thank you very much for your detailed comments.

    I simplified this kata by removing all error checking, since it is a simple kata and you're right that error checking took away all the fun altogether.

    I will have a look at the libraries you mention, and I'll search for kata that deals with errors or maybe make one in the future.

  • Default User Avatar

    In your kata description, you write that motto("Tyrell") should return "growing strong" (lowercased) while the correct answer should be "Growing Strong".

  • Default User Avatar

    Nice fundamental kata. In my opinion, the following edge test cases also make sense:

    Test.expect(![].all(isGreaterThanZero), 'An empty array has not all elements greater than zero');
    Test.expect(![].any(isGreaterThanZero), 'An empty array has not any element greater than zero');
    Test.expect([].none(isGreaterThanZero), 'An empty array has none element greater than zero');
    
    Test.expect(![].all(isLessThanZero), 'An empty array has not all elements lower or equal than zero');
    Test.expect(![].any(isLessThanZero), 'An empty array has not any element lower or equal than zero');
    Test.expect([].none(isLessThanZero), 'An empty array has none element greater or equal than zero');