Basic Syntax In Ruby - Study Mode

[#56] What does the 'chomp' method do in Ruby?
Correct Answer

(A) Removes trailing whitespace

[#57] Which method is used to check if a string contains a specific substring in Ruby?
Correct Answer

(C) .include?

[#58] In Ruby, what does the 'if' statement evaluate?
Correct Answer

(B) Boolean value

[#59] Which operator is used for exponentiation in Ruby?
Correct Answer

(A) **

[#60] What is the result of the expression: 10 / 3 in Ruby?
Correct Answer

(C) 3