From: William James Date: 2007-10-01T04:25:02+09:00 Subject: Re: Can you please help to make decision? On Sep 30, 1:25 pm, 7stud -- wrote: > Here's a simple test for the op. Which of the following do you think is > easier to understand? Can you guess what each program does? > > language1: > -------- > > colors = ["red", "blue", "green"] > > colors.each {|color| puts color} > > language2: > --------- > colors = ["red", "green", "blue"] > > for color in colors: > print color E:\Ruby>irb --prompt xmp colors = ["red", "blue", "green"] ==>["red", "blue", "green"] puts colors red blue green