Looking for swift Answers? Try Ask4KnowledgeBase
Looking for swift Keywords? Try Ask4Keywords

Swift Language Basic Use


Functions can be declared without parameters or a return value. The only required information is a name (hello in this case).

func hello()
    print("Hello World")

Call a function with no parameters by writing its name followed by an empty pair of parenthesis.

//output: "Hello World"