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.
No, you shouldn't return anything. The fact that the
Node
obects are reference types by virtue of being class instances has no bearing on the fact that you can't expect to simply assign to them within your function, as this simply changes the object the local variablesfront
andback
refer to.You need to make
front
have the value of the front of the list and also point towards the second, etc.So I have solution that splits the list correctly. My front and back variables have the correct lists in my function. But the test keeps failing saying my front is equal to null. Should I be returning something? It seems like the way this is supposed to work is these variables change for the test because they're reference types...but that isn't working for some reason.
" (may be in beta)" should be removed too.
C#: tests throw warnings:
This should be removed from the description, this is just confusing if you are not training on the katas in order
Approved :)
I misread your message, I thought you said the contrary. I raised an issue for similar reasons with PHP, I'll add Java to it.
PHP, Java: the kata expects the node data while the description and other languages require a node.
Swift: we must be provided some information about the exception to throw.
That's what the kata asks to do.
throw 'whatever'
works.throw new Error()
works, but your current code only does this... Please read the description.I see that a couple other people were asking about throwing an exception in JS. I understand WHEN to throw the exception, but I don't understand WHAT I need to throw to get this to pass. If I throw a string it fails, if I throw a new Error() the whole Kata errors out....not sure what you mean by 'exception'
Fixed.
awesome that worked! thanks for the help.
Indeed, the problem is you renamed the properties, look at the initial code:
Now it doesn't matter anyway, try again.
Loading more items...