Forums
Learn
Careers
Store
About
SUBSCRIBE
BLACK FRIDAY SALE: Save 50% on all my Swift books and bundles! >>
Question 1/12: This code is valid Swift – true or false?
Hint: Function and parameter names are case-sensitive. Click to show.
func makeBurger(withCheese: Bool) { if cheese { print("Here's a cheeseburger") } else { print("Here's a regular burger") } }
Correct! The makeBurger() function says that its parameter is called withCheese, but it's used as cheese.
makeBurger()
withCheese
cheese
Oops – that's not correct. The makeBurger() function says that its parameter is called withCheese, but it's used as cheese.
Return to Review Menu
You are not logged in
Link copied to your pasteboard.