From: ruby talk Date: 2006-04-23T02:00:07+09:00 Subject: Re: Newbie questoin of the day:A for loop that counts backwards? max=9 for i in 1..8 p max-i end its not very ruby like. but it works On 4/21/06, MenDAKE wrote: > How do I get a for loop to count backwards? > > I have the loop... > > for i in 1 ... 8 > > ...but I want it to start at 8 and end at 1. This does NOT work: > > for i in 8 ... 1 > > Thanks for helping out a newbie. > > -- > Posted via http://www.ruby-forum.com/. > >