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.
a
JS translation kumited and if you want to approve it, I can then start to edit your kata to add a few more test cases, random test included :)
This comment is hidden because it contains spoiler information about the solution
Removes
nil
values from the array.I think it's fine the way it is. Requiring strings won't change the solution that much.
As alpardel said it's the left bitwise shift operator if applied to a Number
If you take an integer 11 which is 1011 in binary and shift the bits 1 to the left you get 10110 = 22
if you shift them 2 to the left you get 101100 = 44
It's a left-shift bit operator: x << n shifts the bits of 'x' n position to the left, doubling its value once for each shift. E.g.: 3 << 2 = 3 * 2 * 2 = 12
http://en.wikipedia.org/wiki/Bitwise_operation#Bit_shifts