Beginner
Ruby
Q19 / 100
How do you check if a string is empty?
Correct! Well done.
Incorrect.
The correct answer is A) str.empty?
A
Correct Answer
str.empty?
Explanation
Methods ending in "?" conventionally return booleans; String#empty? returns true if the string has zero length.
Progress
19/100