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.
How did you do that???
This comment is hidden because it contains spoiler information about the solution
Please use markdown formatting to make your code more readable.
I just realized that and I came back here to say so. Well done fast reply, by the way.
Also, I just realized I should have marked that as question.... Oh well.
This comment is hidden because it contains spoiler information about the solution
I don't get why the name of the clerk needs to be kept as a variable.
I think instead it should be...
I also don't get why there are 3 (edit: 2.5???) functions instead of putting all of that in 1 function.
This comment is hidden because it contains spoiler information about the solution
I agree.EDIT: Oh they have done that now, but I suggest that the either sample tests should have lowercase letters like that, the description should mention it, or the lowercase letter thing shouldn't be in full tests
It's only running the first one of the tests. (sample tests) (javascript)
This comment is hidden because it contains spoiler information about the solution
The first time I did "Attempt", I had a random test that failed but I couldn't figure out why. Attempting a second time, I didn't get the same problem. Can this be explained?
Thanks!
Javascript: What's wrong with my code?
I verified earlier that
array2
is the original array,sortAscending
is the array sorted in ascending order, andsortDescending
is the array sorted in descending order, but for some reason it returnsno
for every test.I found out that when a constant is an object, it's keys can be changed and you can change constant arrays in some ways, you just can't delete elemets. So if I can't keep a constant variable of what the original array is while keeping both sorted versions of the array, what can I do? Is there a different, better way to get that information?
EDIT: Could the
concat
function be useful?But why did my contant variable get sorted without giving an error? I thought that
const
meant that the variable is a constant so it can't be changed, but apparently it did change; it was sorted. What should have happened in this code, is I get an error or something saying that I can't change constant variables. What instead happened is it returnedarray
sorted in descending order.Loading more items...