Last active
December 15, 2015 12:19
-
-
Save EricDykstra/5259713 to your computer and use it in GitHub Desktop.
Phase 1 Assessment Review
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## enumerable methods ## | |
p [1,2,3,4,5].each { |x| x * 2 } == [] #put the output here to make it return true | |
p [1,2,3,4,5].map { |x| x * 2 } == [] | |
p [1,2,3,4,5].select { |x| x % 2 == 0 } == [] | |
## hashes ## | |
hash = {1 => 2, [99,99] => "fifty", a: {b:"a"}} | |
p 2 == hash[1] #example | |
p "fifty" == hash | |
p "a" == hash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment