What do you want to save?
Add Code snippet
New code examples
-
Ruby 2022-02-11 01:30:01
string concatenation in Ruby
#lets get 2 strings from user first first_name = gets last_name = gets #Now concatentate the strings first_name.concat(last_name) =begin Other ways for concatenating string: last_name.prepend(first_name) first_name<<last_name first_name+=last_n... Add solution -
Ruby 2021-11-11 08:59:17
How do you use gets in Ruby
#lets say you want to get the name of the user #The language used here is "ruby" for your kind info. name=gets #name is the variable, and "gets" is the function used for that print "Hello"<<name #Concatinating the st... Add solution
Best helpers
Wo0dy
+5
Jim Pinnells
+5
Spookylukey
+5
Des Wilson
+5
Chris
+5
Ignatz
+5
Gaz
+5
Jo Boiardi
+5
Nthntn
+5
Jonny Five
+5
Asya Saryan
+5
Tralston
+5
Jeff Roe
+5
Hellybaby G
+5
SGoins
+5
Cbeleites
+5