Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

Function Parameters Swift

// function with two parameters
func addNumbers(num1: Int, num2: Int) {
  var sum = num1 + num2
  print("Sum: ",sum)
}

// function with no parameter
func addNumbers() {
  // code
}
 
PREVIOUS NEXT
Tagged: #Function #Parameters #Swift
ADD COMMENT
Topic
Name
8+5 =