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.
Node 18 is currently the latest available version across the entire website. It requires the admins to update any further than that, but no further updates will be made until all JS kata are updated to node 18. There are compatibility issues with some of the older kata, so those need to be fixed first. There is an effort to get all the JS kata updated, you can join the discord and ask for more info.
This caught me out too. It would be good if the node version was updated but I don't know how to do this.
thx that helped me.
will be more attentive next time)
the function declaration for mirror should have the input parameter data
you are instead using a global array called arr
get rid of that, put data in the declaration, and your function should work
take note data was already part if the set-up, but you took it out. avoid that in the future. your function is expected to operate on whatever input the testing suite sends it
PLs help this is my firs Kata in my life my code works in VS Code but i dont know how to put the answer
Thank you BobtheLantern for your quick reply! Truly appreciate :-).
The error msg (below) wan't obvious about node 18. Looking up further, I learnt that node 20 supports toSorted(), as mentioned on MDN
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toSorted#browser_compatibility.
Thank you again !
TypeError: data.slice(...).toSorted is not a function
at mirror (test.js:4:26)
at makeTest (test.js:24:18)
at Context. (test.js:34:7)
at process.processImmediate (node:internal/timers:471:21)
Read the error message that you get.
toSorted()
is not available in node 18 (which is the highest version of node available for this kata). You'll have to find a solution that does not usetoSorted()
.This comment is hidden because it contains spoiler information about the solution
Enabled in this fork
Please see the issue above.
Groovy random tests:
For some reason random tests are generating empty arrays for first element of
data
, which expects us to produce"<tr />"
for it. This is undocumented behaviour, and probably out of range of intended specification. A simple fix would be to avoid generating empty lists altogether.damn i need to learn lambas
Took me long enough, but it's fixed now, please verify.
Wish I knew this earlier
Loading more items...