Skip to content

Commit

Permalink
Fix print typos.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Harris committed Aug 22, 2016
1 parent 0c23547 commit dfb8e94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions swift_15_optionals.playground/Contents.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ print("The player's health is \(player1.health) points.")
// since it might be nil, we need to tell Swift how to handle it when
// un-wrapping it for access.

//print("The player's weapon current weapon is \(player1.weapon.name).")
//print("The player's current weapon is \(player1.weapon.name).")


// We can fix this error by using the '!' symbol. When we put a '!' behind
// the property name we're telling the compiler, "I don’t care that this
// property is optional - go head and un-wrap it for access". But, we should
// only use '!' if we're totally sure that this is safe.

//print("The player's weapon current weapon is \(player1.weapon!.name).")
//print("The player's current weapon is \(player1.weapon!.name).")


// If we're not sure if the player will have a weapon or not, but we want
Expand Down

0 comments on commit dfb8e94

Please sign in to comment.