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.
This doesn't remove the lowest index, does it?
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])
.I've seen people use ~~ a lot with array filter. Not really sure if this is the correct place to ask this, but, what does '~~' do exactly?
Do you mean an Unknown Error?
As suggested in wiki, try using submit instead of run tests, and refreshing the page.
Duplicate.
I created a fiddle with some tests and they all work, but when I post the code here it returns and undefined error.