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.
It does it remove i after the foreach loop and i is the lowest index min value there is cause its compared to the rest of the array.
It's actually a very efficient solution.
EDIT: ~ its bitwise NOT operator https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators#(Bitwise_NOT)
Not quite, I'm not sure what is ~( I thouth its bitwise operator - its not), but its not shortcut to Number casting function eather, that's what I'm sure.
He's expecting undefined and when you call Number(undefined) you'll get NaN. Btw shortcut for Number() is unary operator +.
So when you call ~undefined you get -1, and he wants 0, so its ~~. It would be grate to know the secrets of ~ if somoen care to explain.
He's making sure that
count[a]
is a number. You can think of it as a shortcut toNumber(count[a])
.Do you mean an Unknown Error?
As suggested in wiki, try using submit instead of run tests, and refreshing the page.