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.
The
ISSUE
tag is reserved for critical flaws with the tests. 718 people have solved this Kata in JS before just fine, so, when in doubt, please use theQUESTION
tag instead. As for your question, the code inside your loop needs correction. Instead of focusing on the complicated test that fails, focus on the other more simple test that the solution fails on:f: abcd s: dabcd
returnsabcd
for you when it should returnabcdabcd
. This is a byproduct of the method you use to calculateindexInSecond
.