For all of you Javascript-ers out there, this example is the Ruby equivalent of writing.

Javascript

for(i in array){
  trace(i);
}

# or 

for(i = 0; i < array.length; i++){
  trace(i);
}

Ruby

#A. Create an array
names = %w[chris sandy josie billy suzie]

#B. Find the length of the array and iterate through it 
names.length.times do |i|
  puts i.to_s + " " + names[i]
end