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.
You're right. I confused my code by mistake.
Well, those numbers appear only 1 time. And you wanted to list all numbers that appear an odd number of times, so, it works as expected.
I'm not familiar with Dictionaries so I'm not sure how the code works. But it doesn't seem to work correctly.
if I input allWhat([2, 1, 6, 7], 'odd'); it will return [1, 2, 6, 7]
I wanted to be able to detect multiple odd or even numbers for fun. I solved the challenge differently but was curious how you would implement a function for multiple odd or even cases if you pass in an array.
This comment is hidden because it contains spoiler information about the solution
Don't worry, discuss solutions in Solutions next time, and even there, mark your post as having spoiler content when needed, otherwise your posts there are also shown in the home page.
About your question, if you only need to return the single number that appears an odd number of times, why do you need the other function?
I did not realize it was a pre discussion.
I can't seem to be able to delete it though.
Please don't post solutions in Discourse.
This comment is hidden because it contains spoiler information about the solution