Ad
  • Custom User Avatar

    Kucharskimaciej your comment above is incorrect. +v is not an equivalent of parseInt(v, 10). It is, in fact, an equivalent of Number(v). The '+' operator is a shorthand to coerce each 'v' from a string to a number.

    This might seem like splitting hairs, but it’s a critical point for others to understand this shorthand in a broader context.

    In the solution above, we see that 'int' is already coerced into a number because of the *256. If we step through the first loop of the reduce method without coercing 'v', we can see how the sum would change — 128 * 256 + "32" // "3276832" (INCORRECT) vs 128 * 256 + 32 // 32800 (CORRECT). Without coercing 'v' you actually coerce 'int' back into a string and concatenate 'v'

  • Custom User Avatar

    the point is true + 1 = 2, amazing!

  • Custom User Avatar

    +v is an equivalent of parseInt(v, 10)

  • Custom User Avatar

    'v' and '+v'? what?

  • Custom User Avatar

    I've been thinking about this recently too. It would be nice to keep track of your solution runtimes, and I was thinking that for some katas, it might even be nice to be able to compare solution runtimes with other users. However, the issue is that these solutions probaby run on different hardware at different times, so the results from different runs probably aren't comparable in an apples-to-apples sense. It still might not be an intractible problem, though.

  • Custom User Avatar

    poor English...
    Process took 35ms to complete
    my "cost time" means 35ms
    i can't see my past solutions "cost times".

  • Custom User Avatar

    Enable auto-creation of new Katas from a Gist (or source file on GitHub) which has test cases and some degree of "appropriate/adequate documentation".

    For example, I'd love to auto-upload (or partially auto-upload, maybe) this file:

    https://gist.github.com/c89929f444fa6f26cc7c

  • Custom User Avatar

    cost time?

  • Custom User Avatar

    Make it so that the people who can vote on "Best Practices" are only very experienced programmers..
    This may be able to help keep the lines blurring between "Best Practices" and "Clever".

  • Custom User Avatar

    True = 1
    False = 0
    amazing!!

  • Custom User Avatar

    i m newer in codewars, and i don't know why codewars not have the cost time?