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.
Nice solution! Clear and clever.
Could you explain how this is work?
thanks :)
...
is the spread operator(Spread syntax MDN article). You should google it to learn more.can i ask a question, i dont understend the three dots before list, can you tell what are those. thanks
No, don't use this, this is totally wrong and the worst practice for shuffling:
https://bost.ocks.org/mike/shuffle/compare.html
http://www.robweir.com/blog/2010/02/microsoft-random-browser-ballot.html
The best practice: use Fisher-Yates/Knugh algorithm instead.
(I'm going to repost this to every top solution here that uses random comparator because this is important)
Works for me
This is another example of code that doesn't appear to be passing when pasted exactly as is into codewars for this kata.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution