Last active
January 28, 2016 06:37
-
-
Save burritofanatic/446b56a5cdad1370fe90 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let checkingOnly = BankAccount(checkingAccount: "12345", creditCardAccount: nil) | |
let bothProducts = BankAccount(checkingAccount: "12345", creditCardAccount: "109876") | |
print(bothProducts.checkingAccount) | |
// 12345 | |
print(bothProducts.creditCardAccount) | |
// Optional("109876") | |
print(bothProducts.creditCardAccount!) | |
// "109876" | |
print(checkingOnly.creditCardAccount!) | |
// Crash! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment