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.
When you observe the error feedback it tells you that your function returns
NaN
, so you should start debugging with console to see what is what and why that happens in the first place.Specifically, look at what
lastIndex
amounts to, and what results from that.Good luck!
First of all, please do not post as an
issue
when you do not know why your code does not pass. That's reserved for when there's a problem with the kata code and you can give examples as to why. Instead, post as aquestion
.This comment is hidden because it contains spoiler information about the solution
hi, look this
translation dart
hi,look this
Translation Dart
Its fine, I figured it out for the most part.
Thanks for the effort though.
Approved
Perhaps some reading might help, though this kata does not require to handle default values, only handling of empty list as an edge case is needed.
Haskell translation
This is more of an in general question, but how do you handle Katas that will test for a default value? I know I am supposed to be the one figuring this stuff out, but I can barely figure out how to use default values to begin with, making it hard for me to get points for even the most simple Katas.
If
numbers
contains duplicate values,.index()
will always return the index of the first occurance, messing up your results. There are easier ways to keep track of indexes with built-ins in Python.This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Approved
OP left the building
Loading more items...