Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

reverse range ruby using steps

range = 5...0
Array((range).step(-2))

## will give 5 3 1
 
PREVIOUS NEXT
Tagged: #reverse #range #ruby #steps
ADD COMMENT
Topic
Name
5+2 =