Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func simpleFunction() {
- print("This is a simple function")
- }
- simpleFunction()
- //Output: This is a simple function
- func secondFunction() {
- let friend1 = "Mike"
- let friend2 = "Lisa"
- print("My best friends are \(friend1) and \(friend2)")
- }
- secondFunction()
- //Output: My best friends are Mike and Lisa
- func oneLastFunction() {
- let pi = Double.pi
- print("The square root of pi is \(pi.squareRoot())")
- }
- oneLastFunction()
- //Output: The square root of pi is 1.7724538509055159
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement