Examveda

What does the `chomp` method do when used with strings in Ruby?

A. Removes whitespace from the beginning and end

B. Removes newline characters from the end

C. Removes whitespace from the end

D. Removes newline characters from the beginning

Answer: Option B


Join The Discussion

Related Questions on Arrays, Hashes and Strings in Ruby