One-Liners: Need help


#1

Not sure what I'm doing wrong. I've tried multiple things but can get it to work. Any help is appreciated.
Directions: Rewrite code on one line
Given:
if 1 < 2
puts "One is less than two!"
end

Answers I've tried. Both get the same results"Did you convert the 'if' statement to one line of code?"

puts "One is less than two!" if 1 < 2

puts 'One is less than two!' if 1 < 2


#2

puts "One is less than two!" if 1 < 2

This is the right answer.

Thus I'd say there's something wrong either with your browser on that one, or a little bug with the exercise. You could try restarting your browser and validate the exercise again, or try another browser. My best bet.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.