Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

Swift guard-let Statement

func checkAge() {
	
  var age: Int? = 22

  guard let myAge = age else {
    print("Age is undefined")
    return
  }

  print("My age is (myAge)")
}

checkAge()
Source by thatthinginswift.com #
 
PREVIOUS NEXT
Tagged: #Swift #Statement
ADD COMMENT
Topic
Name
7+4 =