0

Conditional for in Ruby

Please, explain use cicle for and while, i don't understand the diferences and functions

24th Feb 2022, 6:12 AM
Leydy Mayumy
Leydy Mayumy  - avatar
1 Answer
0
Generally, for loops perform statements in a range of numbers (i.e, for i in 1...10) while the while loop performs the statements until the condition set in the while loop is false (i.e, while i < 10). You can refer to Sololearn's Ruby tutorial on Control Structures for the whole layout.
27th Feb 2022, 12:16 AM
HydroShock
HydroShock - avatar