Forums
Learn
Careers
Store
About
SUBSCRIBE
NEW: My new book Pro SwiftUI is out now – level up your SwiftUI skills today! >>
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.