Skip to content

Instantly share code, notes, and snippets.

@megstang
Created August 24, 2020 18:52
Show Gist options
  • Save megstang/3e702b1327ff519694a70e127f8b83a3 to your computer and use it in GitHub Desktop.
Save megstang/3e702b1327ff519694a70e127f8b83a3 to your computer and use it in GitHub Desktop.
Find Practice
  numbers = [5,1,13,2,7,9,10]
  1. Use each to return the first element that is divisible by 3.
  2. Refactor the code you implemented for #1 above to use find instead of each.
  3. Use each to find the first element that is greater than 5.
  4. Refactor the code you implemented for #3 above to use find instead of each.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment