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.
0 is the initial value of a.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce
Drop the caps, please.
The instructions were unclear. I needed to read the comments for them.
YOU ARE GIVEN 2 LISTS: ONE OF GEESE AND ANOTHER ONE TO MODIFY. YOU MUST REMOVE THE GEESE FROM THE SECOND LIST.
Thank you, worked!
It seems you messed up the sample tests, backup your code, click Reset, paste it and try again, they should look like this:
This comment is hidden because it contains spoiler information about the solution
Thanks! Will try again
you are not required to (and should not) mutate the input matrix; your algo is wrong. try your function with e.g.
[[1, 2], [3, 4]]
, it returns[ [ 1, 3, 1, 3 ], [ 2, 4, 2, 4 ] ]
, which is not the transpose of[[1, 2], [3, 4]]
JavaScript
What language?
Hi! My preliminary test gets green but then stops with this message:
expected [ [ 1, 4, 1, 4 ], [ 2, 5, 2, 5 ], [ 3, 6, 3, 6 ] ] to deeply equal [ [ 1, 4, 7 ], [ 2, 5, 8 ], [ 3, 6, 9 ] ]
I don't understand why should I have to mutate the values as it's not required in the instructions. Also I am testing with strings e.g. 'a', 'b', 'c' etc. and it works perfectly. I understand I just need rebuild the rows replacing the positions and changing lengths. Maybe this kata lacks in more detailed instructions? I'm trying to trunckate redundant numbers from the input rows... Any help is welcome :)
Read this: https://docs.codewars.com/training/troubleshooting/#works-but-no
Don't use global vars, they keep their values between tests. If you call your function several times in a row in your IDE it'll fail there too.
My code' output too is 4 years, 68 days, 3 hours and 4 minutes
This comment is hidden because it contains spoiler information about the solution
Hi, why you added the 0 after 'a + b' ?
Loading more items...