Ad
  • Default User Avatar

    I think it's more like 6kyu

  • Default User Avatar

    (JS) Push and unshift methods do not work when toLowerCase used in any part of code. In browser console code work fine

  • Default User Avatar

    Undefined is valid only when it's "" in test - empty string has no length. So I add check on string.length with break to quit code execution: switch (str.length) { case 0: return false break} ABOVE toUpperCase method line, so it had to be irrelevant wether toUpperCase were used in code in lower lines or not.

    Why have testing keep throw an toUpperCase error when I quit code execution before toUpperCase method has been applied?

  • Default User Avatar

    I keep rewrite my code over and over again. I do not use touppercase, (though, why?), I keep have right answers in my browser console, and I keep have errors when trying to test it. Different errors. First version apparently didn't like touppercase using, ok, I changed it. Second version didn't like an replace method (not sure but still, it was adviced in discussion), I changed it too. Third version didn't like an one word case test - expected false to equal '#CodeWars'. But I do have '#CodeWars' as a result in browser console! I also do not check string.length too early, and still, errors.

    The test for this cata is written POORLY and BUGGY! Why does it reject touppercase method and keep throw an error? It also reject fromCharCode(charCodeAt) method and also keep throw an error.

    What. Is. Wrong. With. This. Cata???

    If your test code do have problems with certain methods, then may be you'd mention it in cata conditions not to use this and that?

  • Default User Avatar

    Ok, but why? Isn't it an cata testing problem if it keep throw error when you solve a task with method that is different from what author expected you'l be using?

  • Default User Avatar

    Wow, new method, thanks!

  • Default User Avatar

    Author have to specify that you required to solve this cata with filter method, not mention it. He have to point out that other solve variations wouldn't pass tests.

  • Default User Avatar

    If you try to solve it with reg exp, you have to keep in mind .match method return either non empty array of matches or null. So you need to not just match (think for other methods for null check)

  • Default User Avatar

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

  • Default User Avatar

    Can someone decode what 0 <= x <= 4 is mean?

  • Default User Avatar

    An author?

  • Default User Avatar

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

  • Default User Avatar

    Thank you friend, your advice help me alot and save me lot of time on last part of training.

  • Default User Avatar

    Yeah. Specifically pointing to always keep first element is so much confusing and took me extra time to solve it, thugh first elem would naturally be saved hadn't be there special pointing to "always keep" first element.

  • Default User Avatar
  • Loading more items...