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 problem. Apparently, passed and failed refer here to tests groups, and not to individual tests. That may depend on how the tests are organized.
Ok, I see now that I got confused by the whole "Passed: 0 Failed: 1" message, thinking that I hadn't passed any test and wondering where the second matrix/test run came from. Thanks a lot for your help and patience! :)
Because there are two consecutive tests with matrices of length 3, and your solution passes the first one. Each time you get a new line, it's a new
console.log
.Ok, I may be totally missing something here, but my console.log(matrix.length) produces 3 and 3.
It doesn't.
Fair enough and noted. I'll just ask a question next time. Could you tell me though why matrix.length produces two values? Thank you!
How could it be possible? The signature of the function gives the number of parameters, it cannot vary in Typescript. Please don't raise issues like this, ask questions, maybe. See there: https://docs.codewars.com/training/troubleshooting/
Can it be that in TS two matrices/nested arrays are being tested simultaneously instead of just one at a time? Trying to convert the 2D array into a 1D array results in two 1D arrays.