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.
raise Exception
works.In JS, it should be
throw new Error("error message")
OP solved it though, closing.
JS Translation added
updated description
Good kata, but the task description could mean too many different things. What's really bad is that both "smallest" and "largest" are used, but they are to be considered in a different context:
It would be much better to pick one of the examples in the description, and show us the different divisions, the "smallest" palindrome in each division, and the "largest" of those "smallest" ones.
I'm logging this as issue, as time and again users have complained about this in the comments and I feel the description is still below par.
This comment is hidden because it contains spoiler information about the solution
I feel your pain.
Had the same problem.
The add, subtract and dot methods must raise errors.
The equals method must return only true or false even if the vectors have different sizes.
Cool and original!
raise exception is works
Nice!
I have the same question (in Python). I raised an exception and it ends up being uncaught which causes the tests to exit with error code 1, so they fail even though all the tests show passed. It looks like many people have completed this kata though so maybe we're missing something obvious. Though I think the instructions should be more clear about precisely what "throw an error" means.
No, you don't always pick the highest number, otherwise you might end up on side with lower numbers and won't be able to reach bigger numbers later on.
This comment is hidden because it contains spoiler information about the solution
I think you should to add negative numbers to random tests
Loading more items...