Last active
August 29, 2015 14:19
-
-
Save emcoding/df31e9cf1bb908741e1f to your computer and use it in GitHub Desktop.
exercise 3 from chapter 4.6 Railstutorial
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
person1 = { :first => "Darth", :last => "Vader"} | |
person2 = { :first => "Claudia", :last =>"Cardinale"} | |
person3 = { :first => "Baby", :last => "InTheCorner"} | |
params = { :father => person1, :mother=>person2, :child=>person3 } | |
puts params[:father][:first] #puts print z "" | |
if params[:father][:first]==person1[:first] | |
"test geslaagd" | |
end | |
#I didn't iterate over the hashes, because I think the indexes in hashes are not fixed.? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment