puts 1 < 2 ? "One is less than two" : "not"
You changed an
if into an
if/else. They ask to refactor the code, not change its logical structure.
nevermind, was using ternary instead of one-liners
So what is it meant to be?
puts “words” if truebooleanstatement
Make some substitutions to that and you should be good to go @sherifeji
yeah so what does it mean
puts "6 is less than ten!" if 6 < 10
puts is the action that Ruby will take if the “if” statement is true. Anyting in “” will be printed using puts. Then we use the “if” to add a condition to print “6 is less than ten!”.
I could of confused you more but i hope it helps haha
okay thank you for the help.
puts “One is less than two.” if 1 < 2
It keeps giving me the error: Oops, try again. Make sure your ‘if’ statement still has the same behavior. It should puts ‘One is less than two!’
I found me problem. Why does it have to be so picky?
You should add “!” to the end of yours puts:
puts 1 < 2 ? “One is less than two!” : “not”