Assign strings to variables: : string variable « String « Ruby






Assign strings to variables:


x = "Test"
y = "String"
puts "Success!" if x + y == "TestString"

 








Related examples in the same category

1.A string is a sequence of letters, numbers, and other characters.
2.create a string is with Kernel's String method:
3.String reference