Ruby Reverse String

Use this Ruby Code to Reverse Letters or Numbers in a String





Ruby


puts "original string"
c = "abcdefg"
puts c
d = c.reverse!
puts "your string reversed"
puts d
puts "original number"
e = "123456"
puts e
puts "you number reversed"
f = e.reverse!
puts f


Click here to run this code



More Free Code Examples:


Ruby Word and Letter Counter


Javascript Easy Battleship Game


Hello World in 10 Programming Languages



Try these Fun Games by Bobbie:


Travel Blast Game New York


Play and Learn Russian


Battlestarship Game



Take a look at these Groovy Codes:


Fun IQ Test


Html Svg Starburst


Javascript Particles Fishes



Read the Latest Breaking Programming and Tech News, Great Articles and Tips:


Codenewz Programming and Tech News







Comments

Popular posts from this blog