Beginner
Ruby
Q22 / 100
Which method converts a string "42" to an integer?
Correct! Well done.
Incorrect.
The correct answer is A) "42".to_i
A
Correct Answer
"42".to_i
Explanation
String#to_i converts a string to an integer, returning 0 if conversion is not possible.
Progress
22/100