Fix ruby for-loops examples (#30309)

* Fix ruby for-loops examples

* Fix alignment

* fix: corrected array.each do syntax

* fix: corrected array.each do syntax

* fix: correct array.each do syntax

* fix: corrected array.each do syntax

* fix: correct array.each do syntax

* fix: correct array.each do syntax
This commit is contained in:
Alexander Dervish
2019-03-29 02:27:39 +02:00
committed by Randell Dawson
parent c606946c5c
commit 0191cb2eb4
6 changed files with 44 additions and 44 deletions

View File

@@ -17,7 +17,7 @@ end
There are many many different ways in which you can execute a for loop or loop in Ruby, another such example would be:
```
element.each do |element|
array.each do |element|
puts element
end
```
@@ -27,5 +27,5 @@ This would achieve exactly the same results as the aforementioned for loop, it i
To go one step further, we can write the above loop in the following way:
```
element.each do { |element| puts element }
array.each do |element| puts element end
```