Ad
  • Default User Avatar

    Because sometimes we want to convert from one type to another.

  • Default User Avatar

    I don't understand - "(e.splice(), e)". How does the coma work here? This is the first time I see sth returned as (function, e). I'm confused.

  • Default User Avatar

    Can someone explain to me how does "return" work in reduce()? I don't understand how it could loop like this. Isn't "return" like "break;" in loops? Shoudn't it "break;" after first iteration?

  • Default User Avatar

    Yep, I meant in Chrome's console. I didn't try it in other browser. Do you have any idea why my & your previous code did fail in codewars? Not for the sake of completing a challenge, I'm just curious :)

  • Default User Avatar

    Your code also fails. I tested my & your code in Chrome & it works 100% right. I think sth is wrong with this Kata, not our code.

  • Default User Avatar

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

  • Default User Avatar

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

  • Default User Avatar

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

  • Default User Avatar

    I don't know if some is trolling me or I don't understand sth, but those tests seem to be bugged. There are tests, which make ZERO SENSE like - Tests 0,1,0,0 & it expects 2 instead 4. I passed all initial tests, but in the other phase, I failed massivly & all the tests I failed seem to be broken.