A function that takes a no argument and returns a value in Swift can be created easily. They perform a function when we call these functions, but they take no argument and return no value.
funct functionName(){// perform function here}
functionName
: This is the name for the function we want to create.
import Swift// create functions that take no argument and return valuefunc greetUser() {print("Hi Welcome to Edpresso!!!")}func printEvenNumbersToTen(){print("2, 4, 6, 8, 10")}func aboutSwift(){print("Swift is a good programming language!")}func printValueOfPi(){print("The value of Pi is \(Double.pi)")}// invoke the functionsgreetUser()printEvenNumbersToTen()printValueOfPi()