Rhonda Goolsby2,188 Points
string to integer
string = "123" puts string.to_i
string = "123" # YOUR CODE HERE def string("123") string.to_i end
Clayton PerszykTreehouse Moderator 45,900 Points
If you're trying to pass the challenge, you don't need to define a method. You need to use methods built into ruby, to_i and to_f, to convert the string. Then assign the return values to two different variables, integer and float.
variable = string.method