4/19 Why not if/else?


#1

Do not understand why i can't write this method
def display_balance(pin_number)
puts pin_number == pin ? "Balance: $#{@balance}." : pin_error
end

AS

def display_balance(pin_number)
if pin_number == pin
puts "Balance: $#{@balance}."
else pin_error
end


#2

probly I lost "end" ?


#3

@herzogru I had the same question. Maybe the code-checker is trying to make sure we're using the Ternary format for if/else .