Ad
  • Custom User Avatar

    Indentation is OK now. The line

    for(i=0;i<100;i++){
    

    is missing a let; i is currently implicitly a blogal variable.

    function test is defined twice. Don't Repeat Yourself, move that somewhere where both blocks can see it. JavaScript test suites don't leak into the solution, so top level definitions are not a problem. ( Do not move it to Preloaded - that, intentionally, does leak into solutions. )

    Don't rely on ASI. Insert your own semicolons.

  • Custom User Avatar
  • Custom User Avatar

    Is this how I should do it?

  • Custom User Avatar

    n and required now both mean the same thing. they should have the same name.

  • Custom User Avatar

    Please indent your test suite properly. In six months, a maintainer ( possibly you ) will thank you for it.

  • Custom User Avatar

    Changed to closeTo()

  • Custom User Avatar

    fixed them

  • Custom User Avatar

    Sumit tests should include example tests. Do not just have random submit tests. The last thing you want is a solution passing the submit tests while failing the example tests.

  • Custom User Avatar

    Do not compare floating point numbers for strict equality. This is documented.

  • Custom User Avatar

    you have to draw the number of red balls for every single time until you have reached the required amount of red balls. Balls will not be place back into the box if it has been drawn.

    do you mean

    you have to draw n balls without replacement, and all of them have to be red. If you draw a black ball, you immediately lose.

    ?

    This seems to be what you're asking, but I couldn't read it in the description; I had to reverse engineer an example.

  • Custom User Avatar

    If a kata has solutions, it cannot be deleted. Something with database integrity, and solution points.

  • Custom User Avatar

    You can't (neither can I). Let it be.

  • Custom User Avatar

    How can i delete this kata. Because it keep says "User does not have permission to perform this action" when i try to delete it.

  • Custom User Avatar

    Unfortunately, it's not your call.

    You can think it's fine, but your kata will be downvoted to retirement because the voters don't think it's fine. See https://docs.codewars.com/authoring/tutorials/create-first-kata/#kata-ideas-and-duplicates You are welcome to discuss how unfair this is on Discord#help-authoring.

    You are also welcome to take your chances republishing this. You'll be making work for yourself and for beta testers, and you may not gain any friends doing that after you have been warned, but you can. Experience says you'll have to be quite stubborn to lose your authoring privileges ( though it's been known to happen ).

    If I sound a little exasperated, it's because you are by far not the first inexperienced author to publish a duplicate kata, get it unpublished, and then opine that it's not a duplicate. So many people just don't believe it when they're told.

  • Custom User Avatar

    The weird input and single character input mark the difference, so it's not a duplicate. So I think it's fine.

  • Loading more items...