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.
Can someone pls share any link or explain how the hell .forEach handles this length properly and for() cycle not? )
Is it very important to understand in real life?
Fill it with 'undefined' according to new Array() length, it seems to be working in this case
Thanks for your help!
Good point, going to think about it again!
Split the tests sir, thank you !
Just changed this approach, you just need to return as many cards as you can (but less than 5)
Fixed!
Just fixed the tests!
Thank you, my bad, removed from publishing, working on it
Yeah, thank you, I should have checked tests better! Removed it from publishing for now
Yeah, like if player hadn't played all the cards we may know not all of them. In this case his current hand is [ 'Electro Wizard', 'Mighty Miner', 'Barbarians', undefined (Card he hadn't played and we don't know what is it) ]
Thanks for your review man, appreciate it really! Didn't believe my kata would be great, honestly, that's my first kata here, just wanted to have experience of being on the other side in codewars lol) I'm sure it can be more interesting, or maybe just need to make the 8kyu difficulty afterall )