Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

Swift Swift Function Return Values

func addNumbers(a: Int, b: Int) -> Int {
  var sum = a + b
  return sum
}

let result = addNumbers(a: 2, b: 3)

print("Sum:", result)
Source by www.hackingwithswift.com #
 
PREVIOUS NEXT
Tagged: #Swift #Swift #Function #Return #Values
ADD COMMENT
Topic
Name
1+6 =