Home / Report Question

Q. What is the method used to convert a string to a float in Ruby?
  • A. .to_f
  • B. .to_float
  • C. .convert_float
  • D. .parse_float

Correct Answer: A