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.
I liked the concept of this kata but it seems fairly easy to kind of cheat on it. I feel the point of it was to train using objects but a lot of ppl are just turning the object into an array, using the sort() function, then making it into an object again. So I think that might be a flaw.
The description for this kata is not very thourough. it doesnt say what should happen incase of a number with one digit, and it doesnt really give any example cases.
In the attempt 1 and 0 are treated differently than other single digit numbers which does not make sense, so I believe the solution is broken.
There are also no sample tests.
Though I appreciate the value of Random tests, that would require writing a random sentence generator that guarantees that a number from one to ten being hidden in there. That's significantly more difficult then the problem itself. I not sure it is worth the effort for this problem. But it would definitely be a cool challange to undertake.
Thank you very much! i updated the solution. I will start using this to make my solutions for any future Katas I make
Hey Johan Wiltink thanks for the advice! I fixed the first to things that you mentions (Sorry i had to run out of the house and I guess I did a bad job double checking the work!)
But I am a little confused about the third thing you said "wrap the tests in individual Test.its ( you can still embed n in its text ) and all tests in a Test.describe"
I am not super familiar with writing these test could you maybe send me an example or to a where i could learn to do that?
Hey SuperFruityNinja thank you so much for taking the time to do the problem! I fixed the description. Thank you for the feedback.
Yes it should still count!
Hey Voile, sorry to take so long to respond to your comment. I had to take a break from the community for a while. But I added the random tests