Ad
  • Default User Avatar

    You're right. I confused my code by mistake.

  • Custom User Avatar

    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.

  • Default User Avatar

    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]

  • Default User Avatar

    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.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    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?

  • Default User Avatar

    I did not realize it was a pre discussion.

    I can't seem to be able to delete it though.

  • Custom User Avatar

    Please don't post solutions in Discourse.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution