Logo

Programming-Idioms

History of Idiom 256 > diff from v28 to v29

Edit summary for version 29 by programming-idioms.org:
[Ruby] Better demo link (shows code)

Version 28

2022-02-21, 09:54:20

Version 29

2022-02-28, 13:09:51

Idiom #256 Count backwards

Print the numbers 5, 4, ..., 0 (included), one line per number.

Idiom #256 Count backwards

Print the numbers 5, 4, ..., 0 (included), one line per number.

Extra Keywords
countdown negative step reverse
Extra Keywords
countdown negative step reverse
Code
5.downto(0){|n| puts n }
Code
5.downto(0){|n| puts n }
Demo URL
https://repl.it/@ProgIdioms/DimgreyEntireSystem
Demo URL
https://replit.com/@ProgIdioms/DimgreyEntireSystem#main.rb