Skip to content

Latest commit

 

History

History
14 lines (11 loc) · 439 Bytes

jennys_secret_message.md

File metadata and controls

14 lines (11 loc) · 439 Bytes

Description

Jenny has written a function that returns a greeting for a user. However, she's in love with Johnny, and would like to greet him slightly different. She added a special case to her function, but she made a mistake.

Can you help her?

My Solution

def greet(name)
  name == "Johnny" ? "Hello, my love!" : "Hello, #{name}!"
end