Skip to content

Instantly share code, notes, and snippets.

@dscataglini
Created February 2, 2022 22:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dscataglini/33f277bee3422c749b92745a9915603d to your computer and use it in GitHub Desktop.
Save dscataglini/33f277bee3422c749b92745a9915603d to your computer and use it in GitHub Desktop.
Sample Data:
//randomly generate 1 to 20 numbers with values between 0 and 1000.
2 4 6 8 10 12 14
1 2 3 4 5 6 7 8 9
2 10 20 21 23 24 40 55 60 61
Sample Output:
//perhaps print out your randomly generated array one here so we can compare odds and evens
Odds - []
Evens - [2, 4, 6, 8, 10, 12, 14]
//perhaps print out your randomly generated array one here so we can compare odds and evens
Odds - [1, 3, 5, 7, 9]
Evens - [2, 4, 6, 8]
//perhaps print out your randomly generated array one here so we can compare odds and evens
Odds - [21, 23, 55, 61]
Evens - [2, 10, 20, 24, 40, 60]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment