Q. 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
πŸ’¬ Discuss
βœ… Correct Answer: (B) Removes newline characters from the end

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
157
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
98%
Success Rate