5 kyu

multiply(value, times)

Description
Loading description...
Strings
Fundamentals
View
AllIssues8Questions1Suggestions2Show Resolved
  • Please sign in or sign up to leave a comment.
  • XxNight_Coder_Liam_TLxX Avatar

    Please add Python to this question! I don't really remember how to do Javascript!

  • FArekkusu Avatar

    No sample tests.

  • visph Avatar

    I don't understand why my code fail after passing number, string and function tests by execution time out: running the examples test cases run fine, and I cannot imagine what could take as much time to hang the attempt between testing multiply function and remainded tests (I suppose that only object, null-like values and error cases/invalid values are missing at this point) ?

  • ChristianFlack Avatar

    Where times is 0, an empty string should be returned.

    This should be tested.

  • ChristianFlack Avatar

    This comment has been hidden.

  • Unihedron Avatar

    Typos in the code block section in examples:

    multiply(9, 3) == 9 * 7 == 27;
    multiply("[string], 2) == " \[string]" + "[string]" == "[string][string]";
    

    It should be:

    multiply(9, 3) == (9 * 3) == 27;
    multiply("[string]", 2) == ("[string]" + "[string]") == "[string][string]";
    
  • Unihedron Avatar

    You misspelled multiply as "mutliply" several times in the description, as well as "stirng" as string in the examples. Please do a copy edit.

  • Torkalis Avatar

    The decription is very unclear, specifically in regards to how to handle functions and objects. The description states in regards to functions:

    'Each time the original function is called, the context and arguments should be preserved.'

    There is no notion of their being arguments anywhere else in the description. What arguments? This is very unclear.

  • Lightyear8684 Avatar

    The description could be more informative and clear now it might bring ambiguities that will add further frustration when trying to complete this kata. Lack of proper function execution step explanation is also frustrating, it might be a good idea to provide a clear and concise description what you should implement each step by step to complete this Kata. Now the description feels like out of the place. You get introduced with the conditionals of the assignment which should be seperated from the main requirements of this kata, in my opinion. Function/ Object declaration explanation should be at the top and perhaps rephrased to suit less advanced/beginner programmers.

  • Azuaron Avatar

    "If value is not a number, times can be any integer >= 0. If these conditions are not met, an error should be thrown."

    You'll need a test for value != number, times != integer throwing an error.

  • Azuaron Avatar

    "Anything else: should be returned as-is."

    There is no test for this.

  • GaspardP Avatar

    I did nothing for the function type, but still it is passing the tests.

    Is it normal ?

  • OverZealous Avatar

    I'm confused what we're supposed to be doing with function values. I returned a function that can call the function times times, but now it's complaining about arguments?