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.
Setting the
solution
variable to the solution is non-standard. I think it would be better to callSafe.open(solution)
at the end or properly explain that settingsolution
is all that is required.This comment is hidden because it contains spoiler information about the solution
I think this would make the instructions more clear:
"You need to return a new array with only those elements of
array
that range fromstart
toend
(inclusive)."Trivial for javascript, description probably needs improvement for other languages to clearly specify return values.
The sample tests for this kata do not exist.
This comment is hidden because it contains spoiler information about the solution
Issues with the random test have been resolved. ty!
@GiacomoSorbi the issue was due to the issues with the test, not my stated preference for the data structure.
The description for the third sample test is incorrect:
it('should return 0 to 9 when called with 10',_=>Test.assertSimilar(arr(4), [0,1,2,3]));
I believe the random test suite is completely broken.
I think the input data is modeled pooly. I think it would be better like this:
{
name: 'Jim'
ate: {
hamburgers: 1,
hotdogs: 2,
chickenwings: 3
}
}
Great, ty!
It would be good to have at least 2 sample test cases, one for each sex.
function template is for
twoOldestAges
and there are no sample tests.Thank you, that works.
My javascript output is visually identical to the expected output and the test will pass if I change to assertSimilar. Any hints?
Can you explain the rules behind the corner cases?
Loading more items...