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.
6. The returned array should be sorted(in Unicode code point order)
Actual nightmare fuel
Holy sh$t, why must the return array be in the exact same order, or how ??
Is this genuinely a 6 kyu kata? I got a solution, but it doesn't get past 100 tests before time runs out. Ion know maps and hashes
what?
COBOL translation (author is inactive). I also changed the description to be language agnostic, it's useless and against the official recommendations to have codeblocks language specifics, a general description describing the task and a few examples is enough (the two notes about C and NASM would better be included in solution set up, but I didn't change it).
You're welcome and you learned something new too. Always check the docs when something doesn't work as you expect, and MDN is user-friendly.
LITERALLY ALL I HAD TO DO WAS CHANGE FOR..IN INTO FOR..OF. You are an absolute legend man
Thank you
Read this: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in#array_iteration_and_for...in
Array.prototype has an added method in the testing part and that's what you're seeing there with for...in, you have some other ways to iterate over an array, some listed in the link, for loop is one of them.
Meaning I should get the length of the array and use a traditional for loop? (Btw if you dont mind, why does for in cause this? The code works just as intended outside the tests, I checked and got the value I should've)
in JavaScript my code works fine, it returns the needed value, but in tests I get errors because a variable randomly becomes [Function], what is the cause of this ?
Many things can cause this. Make a research online and you'll get an idea. It's impossible to help you, we have no idea of what you are doing. See the documentation: https://docs.codewars.com/training/troubleshooting/
I pass all the basic tests but I get an UndefinedBehaviorSanitizer error when I attempt. Do you know the reason why?
Am I missing something, why is this so difficult (Nvm 3 hours of brainsplitting thinking finally made me figure out how to create multiple unique arrays(spoilers, nested array, at least in python lmao))
Loading more items...