Friday, October 30, 2009

Ruby on Rails : Loop Alphabet A to Z

Print alphabet from A to Z using Array.

Example code :
<%= ('A' .. 'Z').to_a*" " %>

Output :
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

3 comments: