Content deleted Content added
Youssefsan (talk | contribs) es: |
m reformat code example, it was too wide |
||
Line 33:
Here is a sample of Ruby code:
▲ # Execute the following block of code 10 times
# Replace ' ' with ', ' and store in string1
▲ 10.times {
string1 = "Hello world".gsub(" ", ",")
string1 += "!"
}▼
# print variable 'string1', followed by a newline
puts string1
More Ruby code is available in form of sample algorithm implementations in the articles:
|