Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Inspiring!
very clever! Almost artistic, I'd say :)
if
a.length
is 0, then it would be consideredfalsey
(any of: 0, null, NaN, false, '', undefined) and it would jump to the next condition (b.length) and so on until it finds a truthy value OR hitting variablec
which is 0 (considered falsey again), ending/never starting the while loop.for the
~~
operators, it's a binary operator, called bitwise NOT. It will invert the bits ofundefined
, making it be -1, then inverting again (~~) and being 0.source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_NOT