func fullName(fName:String,lName:String) -> String {
let myFullName:String = "\(fName) \(lName)"
// print(myFullName)
return myFullName
}
//calling the parameter
let name:String = fullName(fName: "Hi", lName: "Hello")
print(name)
/**************/
return function with parameter:
func add(first:Int, second:Int) -> Int {
return first+second
}
//calling the parameter
var addition = add(first: 10, second: 5)
print(addition)
let myFullName:String = "\(fName) \(lName)"
// print(myFullName)
return myFullName
}
//calling the parameter
let name:String = fullName(fName: "Hi", lName: "Hello")
print(name)
/**************/
return function with parameter:
func add(first:Int, second:Int) -> Int {
return first+second
}
//calling the parameter
var addition = add(first: 10, second: 5)
print(addition)
Sign up here with your email
ConversionConversion EmoticonEmoticon