Last active
August 29, 2015 14:02
-
-
Save doug7410/99a02989c3b586eb7aca to your computer and use it in GitHub Desktop.
Answer to Tea Leaf Academy lesson 1 : make a quiz question
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
# Question | |
How can the code below be refactored into one line? | |
arr = [2,3,4,5] | |
arr *= 4 | |
arr.shuffle | |
# Answer | |
arr = ( [2,3,4,5] * 4 ).shuffle |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment