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.
Thanks for clearing this up. Strings' lengths aren't necessarily the same.
Updated the description
Not a kata issue, it's a problem with your code. Check the test input, it has only one name, no wonder
names[countNames-2].name
will fail.This comment is hidden because it contains spoiler information about the solution
thank you.
I don't think that last if statement is necessary to produce 0, as excla * ques by default equals 0 * 0= 0;
Nice work!
You know the last 3 lines could just be summarized into
return [res2, res1];
Also indent your code!!!!
To describe the assignment a bit better:
You want to create a function that takes an array of strings as arguments(all strings inside the array have the same length), and wants to create a new string that consists of the nth value of every string.
So to give a clear example: if the array of strings is [hat,pun,leg] the required output will need to be "hug". (first value of array1 "h", second value of array2 "u", third value of array3 "g")
Hope this makes things clearer
Also, agree that the description is too ambiguous, and the test cases don't really make the assignment clear either.