Ad
  • Custom User Avatar

    I'm getting the error "TypeError: Property 'fileSize' of object # is not a function" when I try to run.

  • Custom User Avatar

    @surtich @alex.budiakov I resubmitted my code and all tests passed. Don't know who made the change, but it works now.

  • Custom User Avatar

    This Kata is a duplicate (as mentioned abive) so I'm not sure if this Kata is worth publishing but I did change the Test Cases to use Test.assertSimilar.

  • Custom User Avatar

    This Kata is a duplicate (as mentioned below) so I'm not sure if this Kata is worth publishing but I did make the changes you suggested.

  • Custom User Avatar

    Yah, I saw that under "Similar Kata" after I published. I did do a search before I created the Kata but that existing pluck Kata didn't show as a result. I have a feeling that the CodeWars search doesn't work right sometimes. "Similar Kata" seems pretty smart; does anyone have any tips for searching better?

  • Custom User Avatar

    @fearphage What do you think of this Kata for writing a pluck function?

  • Custom User Avatar

    @fearphage Good to see you around!

    I see your point. What do you think about the idea of Katas involving answering questions about data in general? I don't see a lot of Katas that deal with searching and filtering datasets. That is something that comes up a lot in practical applications of all languages and I see many developers who have trouble looping through and navigating data efficiently. And such a Kata would easily translate to other languages.

    As far as JavaScript, there are lessons to be learned in the ES5 array methods and the ES6 arrow functions that can also be learned and practiced by working with datasets.

    What do you think?

  • Custom User Avatar
  • Custom User Avatar

    EDIT Nevermind. I discovered a case that caused my code to enter an infinite loop :)

    My submission is timing out at 6000ms. Can you give me an idea of what kind of test takes a long time? Maybe I need to optimize my code, but I don't see where it would be slow.

    Codewars has been having some issues running code today, so it may just be that.

  • Custom User Avatar

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

  • Custom User Avatar

    @surtich my solution is still failing the loops check. Let me know if you'd like to see my code.

  • Custom User Avatar

    I'm having the same problem. The failing test says:

    must be a non iterative solution
      The solution must not have loops
    

    I do not have "for" or "while" anywhere in my solution. I don't have addition or subtraction anywhere, just -- and ++. I even tried removing the braces from my "if" blocks, but still the same failure. All other tests pass.