Advertisement
Guest User

Untitled

a guest
Jul 24th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. # cities = ['berlin', 'tokyo']
  2. # # 0 1
  3.  
  4. # cities[1]
  5.  
  6. students = [ "Peter", "Mary", "George", "Emma" ]
  7. student_ages = [ 24 , 25 , 22 , 20 ]
  8.  
  9.  
  10. students.each_with_index do |student, index|
  11. age = student_ages[index]
  12. puts "#{student} is #{age} years old"
  13. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement