Learn Ruby Array

//An array holds a number of items. In this example, the array is holding things I like.

things_i_like = ["books", "teat", "movies"]

things_i_like.each do |thing|
  puts "I like " + thing
end

//an array full of numbers. We need to print the double of each number in that array.
numbers = [2,4, 6, 8]
numbers.each do |item|
   puts item * 2
end

//Reverse an Array
things_i_like = ["books", "teat", "movies"]
reversed_array = things_i_like.reverse

reversed_array.each do |thing|
  puts "I like " + thing
end

//Get Item From a Position in Array
things_i_like = ["books", "teat", "movies"]
puts things_i_like[1] // teat