Vidyalelo
Ruby Programming · Q25

Arrays, Hashes and Strings in Ruby

Programming · Ruby Programming · question 25

Q25

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
Answer
C.
Removes whitespace from the end
D.
Removes newline characters from the beginning

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board