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.
Your comment was written 6 years ago, but the sample tests are okay now, when I tried my first attempt.
This comment is hidden because it contains spoiler information about the solution
Please when pasting code, use proper markdown and also mark your post as having spoiler content (I did for you this time).
The keys of an object are strings, so you should convert them before pushing to your array to have an array of numbers.
This comment is hidden because it contains spoiler information about the solution
That's not an issue, you're returning an array/list of strings instead of one of numbers. The problem is in your code.
This comment is hidden because it contains spoiler information about the solution
perceNt, not perent :)
It looks like the "Run sample tests" function doesn't quite work in Javascript, it doesn't seem to run any tests:
The word duplicate has to do with there being "two" of something. It should be changed to "multiple copies".
Nice beginner kata!
Python, Ruby and Crystal translations submitted, if you want to approve them; cheers :)
The example is pretty clear I think:
Input : [1,2,1,2,1,1,2,2] , Output : []
The array couldn't be empty if you're not removing all the duplicate elements.
But yeah, the author should definitely add example tests.
Yeah, well, it was the first time i coded test cases, so i really didnt want to screw this up :D but yes, likely overkill haha
Thank you appreciated! it was my first Kata.
The description is a tad confusing. You tell us to remove duplicates. To me that means remove all but one of the duplicates so that the resulting array doesn't have any duplicates in it:
But that's not what you meant, judging by the tests. Could you rephrase to make this clearer?
Also, you could add an example test for the example you gave in the description.
@WaedSaleh you may refer to this guide when writing your own random test cases in the future.
Loading more items...