How can we add a number in a string to an integer?

print integer + stringprint integer.to_s + stringprint integer + string.to_iprint "#{integer}" + string

That's it! We can convert a string into an integer if the value of the string makes sense as a number. Adding two strings together, we only get a string to display.

Not quite! We can convert a string into an integer if the value of the string makes sense as a number. Adding two strings together, we only get a string to display.