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.
ok, thanks
Where did you get that last 20?
...
Read the info on that link please, you need to write
print(whatever_value_you_want_to_inspect)
. In this case,print(arr)
. And that works in both, you need to write it inside your functionfind_hack
, not in another function that doesn't get called in the tests.log outputs only on the 'test' button, not on the 'attempt'
Print the input yourself to debug your code: https://docs.codewars.com/training/troubleshooting#print-input
what are the inputs 'Fixed tests 3'???
Fixed tests 3:
['name3', 'name4'] should equal ['name2', 'name3', 'name4']???
Why???,,,
the code should go perfectly
all other 204 tests have been passed
When you mutate the input, unexpected results could happen. I've changed the tests so it doesn't matter anymore, but keep that in mind.
So please forgive me if I'm missing something basic and this is a moronic question,
but it's a key part of this not to mutate the input?
That happened because you mutated the input in your code. Now it doesn't matter.
Tests pass, but I get "Cannot read property 'reduce' of undefined
at arr.filter" on attempt. Can anyone explain what this means? I'm not using reduce or filter in my code. Is this a bug or a user error?
First of all, thank you! Also I found a mistake in my own understanding of the task. I didn't take account that any other letters except 'C' and 'D' lead to absence of additional 20 points. Briefly, we get 20 points if an array consists only of 'A' and 'B'. Unfortunately, i didn't understand it at first.
Print the input to debug your code.
Your code marks students having any other mark as hacked.
Loading more items...