This comment is hidden because it contains spoiler information about the solution
When I Test my Code locally, it passes all Tests, but when i test it on Browser it just fails at test example3. I cant see any way how to debug the test and I cant understand any of the logs. Could you please correct this issue?
You have to return a list.
Some of these tests are a little excessive. I am passing all the sample tests, but can't pass the final tests and can't compare because they're all too long to read and just say, "and x others"
thanks man,I finally managed to pull it off!!
search about "key sorting functions"
I'm new to this programming thing :D and , I'm stuck with 3 different arrays showing the 3 different sorting criteria.I know this is not stackoverflow but still..I need some help.How am I gonna be able to compare and rank the teams?
@ytorn I agree with you. From where I'm standing, there are only 3 few possible options:
I found an interesting thing - my sorting function is working perfectly in browser, but the result differs in codewars, that's why I can't solve the kata. And this this is not a first time when results differ. Would be very thankful for any advices or explanation.
@jsalinasf, I have faced exactly the same thing, and this is the main question - how to fixed something that is not visible. No errors, no timeout, nothing. Just half of tests is correct, another half is not and you can't discover what's wrong
Thank you all for taking the time to answer my question. @ytorn is correct, I can't use console.log() because of large size data. Just to clarify, I'm not receiving a timeout, the tests complete on time but the array Im returning is not equal to the expected one. I tried to login games, Rank, Team, For, etc but the only thing Im receiving is "expected [ Array(#) ] to deeply equal [ Array(#) ]". That's why I was wondering if maybe some good sould have a large dataset to test my code :)
Thanks for clarification!
Do you get a timeout? Then you may need to optimize your code. Otherwise I tried to debug my code by printing the table with Rank, Team, For, Against, GD, Points like in the description. Maybe this could be helpful.
Rank, Team, For, Against, GD, Points