Guest User

Untitled

a guest
Nov 24th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. array1 = [1, 2, 3, 4]
  2. array2 = %w{peter piper picked pepper}
  3. array3 = []
  4.  
  5. array3 = array1.zip(array2).join(' ').split
  6.  
  7. if array3 == ['1', 'peter', '2', 'piper', '3', 'picked', '4', 'pepper' ]
  8. puts "Success"
  9. else
  10. puts "Failed"
  11. end
Add Comment
Please, Sign In to add comment