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.
@farhanaditya - on MDN: The flat() method creates a new array with all sub-array elements concatenated into it recursively up to the specified depth.
See here for more details: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat
Just curious, what would you need that for?
Thanks you two! It was a good chance to try something different in the meanwhile :)
Depends on Node version, https://developer.mozilla.org/es/docs/Web/JavaScript/Referencia/Objetos_globales/Array/flat
Until this kata is updated to use a newer version of Node, it won't work. In some other katas Node 12 is enabled and you could use it.
Hey Hanna!
.flat()
doesn't work in codewars :(This comment is hidden because it contains spoiler information about the solution