Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

Swift guard with multiple conditions

func checkJobEligibility() {
    
  var age = 33

  guard age >= 18, age <= 40 else {
    print("Not Eligible for Job")
    return
  }

  print("You are eligible for this job")

}

checkJobEligibility()
 
PREVIOUS NEXT
Tagged: #Swift #guard #multiple #conditions
ADD COMMENT
Topic
Name
1+8 =