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.
what is the problem?
with sort, did you also use the comparison function?
JS not up to date??
you're right, thanks, I wasn't understanding the exercise correctly. The sort function did not work here. Thanks.
[ 1, 3, 2, 5, 3 ]
is what's expected according to that messageI'm stuck with this, my log result is the same as the expected result and keeps saying it is wrong:
I'm using Javascript to return an array that was sorted in reverse.
OP solved it, closing
fair :(
The test is not broken, what, I believe, leaves us only the latter option :)
Your solution fails one of example tests. Check which one, what is its input, and then try to figure out why.
This comment is hidden because it contains spoiler information about the solution
i am stuck on this one for days, it is in C,
idk how but the test breaks if i input the correct value on the last index of the array,
but if i input literally any other value, it's fine?
probably in a few days i will find the solution and i will feel stupid then, but
if i don't compete this one i will regret it for the rest of my life >_<
Again, n in this kata is a number, not an array. Try with n = 13253.
This comment is hidden because it contains spoiler information about the solution
You must be testing something different, because this function takes a number, and number type doesn't have
.reverse()
method. Only arrays do.Question?
I try to use the simply, n.reverse(); which works just fine in the console of the browser, but it detected as an error.
const reversed = n.reverse();
return reversed
Loading more items...